This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTextField  and TAB key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextField  and TAB key" Watch "JTextField  and TAB key" New topic

JTextField and TAB key

Mike Johns

Joined: Mar 01, 2001
Posts: 10
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

Joined: May 11, 2001
Posts: 152
How about a KeyAdapter subclass that catches the
Tab key and invokes the same thing your
ActionListener invokes?
I agree. Here's the link:
subject: JTextField and TAB key
It's not a secret anymore!