Reputation: 125
I am new to the java language and I want to set tab order in JTable
in java swing. How can we set tab order in java swing?
Upvotes: 4
Views: 8720
Reputation: 324108
You need to write a custom Action that does tabbing the way you want. Read up on Key Bindings to find out how to replace an existing Action.
Or for an example that reuses the existing Action to only tab to cells that are editable you can check out Table Tabbing.
Upvotes: 1
Reputation: 57381
http://compgroups.net/comp.lang.java.gui/Custom-Tab-order-within-a-JTable
Upvotes: 2
Reputation: 2666
I assume you mean the "FocusTraversalPolicy", not sure if that is easy to handle inside of a JTable, however here is the relevant article from Sun/Oracle: http://download.oracle.com/javase/tutorial/uiswing/misc/focus.html
Upvotes: 2