KeyListener

KeyListener works in Applet but not in JApplet

Following scenario: A simple Applet implementing the KeyListener <code> public class AppletMain extends Applet implements KeyListener{ } </code> Therefore you have to override following methods: <code> public void keyPressed(KeyEvent k) { } public void keyReleased(KeyEvent k) { } public void keyTyped(KeyEvent k) { System.out.println("A key has been typed"); } </code> This works perfectly, unfortunatly if I change it to a JApplet the Keys are not recognized anymore
Subscribe to KeyListener