Responsive Ad Area
Home » Blog » applet


Handling Keyboard Input and Mouse Events

Keyboard Input and Mouse Events In this example, I show you some simple input examples using Applets. Later I might add Web Start or even Swing Desktop examples. Here we get keyboard input (typing) as keyDown event. And we get mouse positions and clicks. We demonstrated mouse input as move, clicks and mouse drag and drop with a more complex example using a vector sprite stickman. See also Sound Effects and Music Keyboard Input Here I give you sample HTML needed. Put the source and HTML in the same folder and compile the source with 'javac' Save this as 'keyboard.html' then run it at the console with 'appletviewer keyboard.html' . Note that you will have to give the window focus by clicking it, then when you press a key, output in the console will show which key was pressed. It...

Arksoft Demo 2 Applets Part 1

Applets Demo Part One Applets I show you how to find the dox console, or windows shell, or command line. I show you how to find and use the Java Control Panel. I show you how to add a trusted site. I show you how to write and applet and view it with both applet viewer and Windows Internet Explorer from the local hard drive or localhost. I also show  you a little about a Java game Free Colonization.