Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tab Key Fire Action Listener

 
Terry Tucker
Greenhorn
Posts: 24
Linux Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings:

I am a greenhorn!

I am working on a simple GUI application. I want the tab key to generate an actionPerformed() event for my ActionListener. Also, I want the Enter key to perform the same action as the Tab key; that is, move focus to the next field. In other words, I want these two keys to be synonymous is their behaviour. Can you point me to a good example of how to do that?

Thanks...
 
Tony Docherty
Bartender
Posts: 2957
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you look into key bindings
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic