Author
Removing a component from tab order
Barry Brashear
Ranch Hand
Joined: Jun 05, 2001
Posts: 303
posted Nov 11, 2004 11:52:00
0
I would like to remove a few components from the tab order in a JPanel . So they only obtain focus if click on. Does someone know how to do this? Thanks.
Priyaa V Kumar
Ranch Hand
Joined: Aug 12, 2004
Posts: 32
Try something like this. Supposing you have four textfields in a Jpanel, jPanel1.add(jTextField1, new XYConstraints(72, 5, 120, -1)); jPanel1.add(jTextField2, new XYConstraints(72, 48, 120, 21)); jPanel1.add(jTextField3, new XYConstraints(72, 90, 120, 21)); jPanel1.add(jTextField4, new XYConstraints(72, 133, 120, 21)); Adding a line this, would skip textfield2 from Tab order. ie. Tabbing goes to first field, third field, fourth field and then would go to first field jTextField1.setNextFocusableComponent(jTextField3);
subject: Removing a component from tab order