Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Process key in applet.  RSS feed

 
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: 515
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!