Meaningless Drivel is fun!*
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
Author

JTextField and TAB key

Mike Johns
Greenhorn

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?
HTH,
Joe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTextField and TAB key
 
Similar Threads
Tabbing from a JComboBox inside JTable
disable
Pressing a key from the code
How to catch key event in JTable
Html glass pane