Awesome.
Some simple animation is incredibly simple! It didn’t take me long to get a ball bouncing off of the four walls.
One question with this, though:
public boolean keyDown(Event e, int key)
{
message = "value = " + key;
return true;
}
Should sticking this code into my applet be receiving input from my keyboard? It doesn’t seem to be working. (In my paint method I’ve got .drawString(message,40,40);
If that should be working, what is the point of trying to use EventListeners?
edit:: I took a look at the pong source you pointed me to. It seems as if that applet used the method described above for receiving input from the keyboard, and that applet works … I’ll have poke at my applet until it works. (It’s compiling but not displaying anything in response to keyboard input. Strange… maybe it has to do with the gotFocus events?)
Thanks for the help!