IntelliJ Java IDE
The moose likes Applets and the fly likes Process key in applet. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Process key in applet." Watch "Process key in applet." New topic
Author

Process key in applet.

vladislav peichev
Greenhorn

Joined: Apr 28, 2011
Posts: 22
I have an applet containing a JPanel. In Firefox sometimes if the applet is active but the JPanel and the applet itself do not get key events e.g. Esc key pressed. Is there a way to ensure that the applet gets the key? Thanks in advance.
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 110

vladislav peichev wrote:I have an applet containing a JPanel. In Firefox sometimes if the applet is active but the JPanel and the applet itself do not get key events e.g. Esc key pressed. Is there a way to ensure that the applet gets the key? Thanks in advance.

I think the applet consumes the events and does not dispatch them to its children. So try to catch the events from the JPanel instead.


My Blog - Java SE Quick Downloads
 
 
subject: Process key in applet.
 
Threads others viewed
quick qu?
Using KeyListener in an applet
Javascript applet communication
Help with two buttons on applet
WA #2 ..... word association
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture