• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Tab order problem with JTextField, JTable, JButton...help please(URGENT)...

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all:
i have JTextField, JTable and JButton.
The tabbed order must be like this:
JTextField, JTable, JButton
How it behaves now:
When i press tab for the first time, the focus goes to JTextField. Again if i press tab, focus goes to JTable. But when i again press tab, the focus goes to next column...when i press tab again and again, it is always within JTable and it does not come out. The focus does not go to JButton at all.
If i extend JTable and override isFocusTraversable() to return false. I am getting the tab order behaviour like this: When i press tab for the first time, the focus goes to JTextField. Again if i press tab, focus goes to JButton. The focus does not go to JTable at all.
How do i want the implementation to be:
I want to implement like this: When i first press tab, the focus should go to JTextField. Again if i press tab, focus should go to JTable (first row, first column). When i again press tab, the focus should go to JButton. When the focus is in JTable, if i move arrow keys, it should move up/down within JTable but if i press tab, it should go out of JTable and it should go to JButton
Please help me...
Thanks a lot.
Sridevi
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use Ctrl+Tab to leave the JTable. Tab inside the table is used to jump from one cell to another cell of the table.
 
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic