Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

swing buttons  RSS feed

 
sugashini justin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 12 swing buttons, how to use focus using tab key?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Focus should switch between each of the 12 buttons using tab key automatically - if that is all you have in your GUI... are there other components? Especially text components - these have to recognize the tab key as text input - not focus switching. If this is the case, try doing a requestFocus() on the first button when the GUI/Panel is first displayed - you may also need to customize focus traversal.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!