• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Enter should work as TAB.

needs modification if you do not want tab to also work

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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();



 
reply
    Bookmark Topic Watch Topic
  • New Topic