• Post Reply Bookmark Topic Watch Topic
  • New Topic

Process key in applet.

 
vladislav peichev
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 512
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!