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

JTextField and TAB key

 
Mike Johns
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone have an idea how I can simulate the ENTER key with the TAB key so that my Action Listener will be triggered when I tab from one JTF to another?
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about a KeyAdapter subclass that catches the
Tab key and invokes the same thing your
ActionListener invokes?
HTH,
Joe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic