Reputation:
Above is the picture of my program. I used JTextField, JTextArea and JTable to create my program. What I want to do, is to allow user to press "tab" to switch between the 4 different components. However, when it reaches the JTable called "Deadlines and Time Task", "tab" will just switch between cells. What I want is to make "tab" switch to the table below instead.
The reason is to allow my program to support the use of keyboard to scroll the table. Else, I can't scroll the table below using keyboard.
Upvotes: 1
Views: 330
Reputation: 32507
You have to use your own custom Focus Traversal Policy. Here you have link to How to Use Focus Subsystem Swing Tutorial
and the section that you are interested in is "Customizing Focus Traversal"
The live demo presented there, presents exact behaviour you are need (tabbing between tables, not between cells)
Upvotes: 3