Applets run within a web browser, and how that web browser interprets focus can change depending upon the browser (both brand and version - in other words, update your browser and focus can change)....
Type: Posts; User: copeg
Applets run within a web browser, and how that web browser interprets focus can change depending upon the browser (both brand and version - in other words, update your browser and focus can change)....
Be sure the component that has the KeyListener registered has focus. An alternative is to use KeyBindings
How to Use Key Bindings (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other...