This week's book giveaway is in the Game Development forum.
We're giving away four copies of Badass: Making Users Awesome and have Kathy Sierra on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Tabbing bewteen textfields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Tabbing bewteen textfields" Watch "Tabbing bewteen textfields" New topic

Tabbing bewteen textfields

Michael Bell

Joined: Dec 05, 2005
Posts: 19
I have a JPanel containing text fields. By default when the tab key is pressed traversal is horizontal rows and then columns. I wish to go down the column first. Can this be done simply or must I do

public class MyOwnFocusTraversalPolicy
extends FocusTraversalPolicy { .....
Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150

Default tab-order is according to the components added to JPanel. First
try to add components as they are in tab-order. If that doesnot work then implement your own tab-order policy.


~ Anand,
SCJP 1.5, SCWCD 1.5
I agree. Here's the link:
subject: Tabbing bewteen textfields