Jishnu
Jishnu

Reputation: 125

Java tab order: How to set Tab order in java swing table

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

Answers (3)

camickr
camickr

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

Angel O'Sphere
Angel O'Sphere

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

Related Questions