aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how I can implement enter as tab functionality? when someone pressed enter focus goes to next widget Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how I can implement enter as tab functionality? when someone pressed enter focus goes to next widget" Watch "how I can implement enter as tab functionality? when someone pressed enter focus goes to next widget" New topic
Author

how I can implement enter as tab functionality? when someone pressed enter focus goes to next widget

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Can you please let me know how I can implement Enter as Tab feature, for example in a form with 10 different JTextbox, I want to make it possible to my users to hit the enter when they finished typing content of one JTextbox and g to next JTextbox. Enter should work as TAB.

Thanks
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Enter should work as TAB.

needs modification if you do not want tab to also work

Bikash Megale
Greenhorn

Joined: Jan 01, 2007
Posts: 6
for example in a form with 10 different JTextbox, I want to make it possible to my users to hit the enter when they finished typing content of one JTextbox and g to next JTextbox. Enter should work as TAB.




you can use keyListener if enter key pressed then you can move focus to the desirable component by using requestFocus();



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how I can implement enter as tab functionality? when someone pressed enter focus goes to next widget