I made a Pong java applet for my programming class.
It works in the Windows OS, but I'm having an issue running it under Ubuntu.
When I run my applet, My KeyListener does not respond with the code I have programmed.
for example, when I press the Up/Down arrow keys, the paddle does not move up or down.
However, the applet draws just fine, and my timer works.
Do I need to use a different KeyEvent than I am using in the code here:
public void keyPressed(KeyEvent event)
int keyCode = event.getKeyCode();
if(keyCode == KeyEvent.VK_UP)
pd1.y -= 25;
Again, the program works perfectly in Windows.
I am guessing there is something wrong with the line:
"keyCode == KeyEvent.VK_UP"