| Author |
Pressing Tab enter JTable, pressing Tab again exit JTable
|
Ling Chung
Ranch Hand
Joined: Mar 29, 2004
Posts: 39
|
|
hello all, i have a few fields in a panel and by pressing tab i go through them as i want it to, but beneath this panel is JTable when i enter this table upon pressing Tab it goes further by setting focus to each column and expanding to the next row if you keep pressing Tab. I would like to set focus only once to the first row of the Table and then next Tab will be exit JTable and set focus again to the fields in my panel. How can this be accomplished? Thanks a lot!!!
|
 |
Fuqiang Zhao
Greenhorn
Joined: Jan 07, 2004
Posts: 24
|
|
table.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null); table.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null); table.setFocusCycleRoot(false);
|
 |
Ling Chung
Ranch Hand
Joined: Mar 29, 2004
Posts: 39
|
|
Thanks a lot this is exactly what i needed. But now it selects the first cell in the table but how can i make it to select the entire row when focus is on the table when TAB is pressed? Thanks for the help!!
|
 |
 |
|
|
subject: Pressing Tab enter JTable, pressing Tab again exit JTable
|
|
|