• Post Reply Bookmark Topic Watch Topic
  • New Topic

Global keylistener  RSS feed

 
Andy Wong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,
I'm going to add a keylistener to the outmost jFrame to detect all keystrokes (no matter the focus on which component, as long as the frame is current), but it fails to detect anything. Is it the proper way to do so?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at this article in JavaWorld... it shows how to do this...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!