This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Tab order problem with JTextField, JTable, JButton...help please(URGENT)... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Tab order problem with JTextField, JTable, JButton...help please(URGENT)..." Watch "Tab order problem with JTextField, JTable, JButton...help please(URGENT)..." New topic
Author

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

sridevi kumar
Ranch Hand

Joined: Oct 17, 2001
Posts: 31
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
Thorsten Schenkel
Greenhorn

Joined: Jul 02, 2002
Posts: 7
Use Ctrl+Tab to leave the JTable. Tab inside the table is used to jump from one cell to another cell of the table.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tab order problem with JTextField, JTable, JButton...help please(URGENT)...