Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

global event listener

 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I know that only the focused component can register events from the keyboard. But I have read that there is a method which can handle every key strokes from the keyboard.

I have JFrame object. I want to register "ctrl + plus" key strokes. Can anyone give me an example of the code? I would really appreciate it!
 
Campbell Ritchie
Sheriff
Posts: 48648
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this about key listeners any use to you?
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I will analyze that and give you a response.
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also take a look at key bindings and Rob Camick's Global Event Listeners.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic