File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes tabbing in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "tabbing in JTable" Watch "tabbing in JTable" New topic

tabbing in JTable

lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
hi guys,
i have a JTable in one JInternal Frame and set of textfields in the second JInternal frame.when i hit a insert button ,a new row will be added to the JTable and after entering a value for that cell and if i hit tab key,the focus should go to the first text field in the second JInternal frame.
i have tried adding a Key Listener and if the event was from tab key do,
this is not setting the cursor to the textfield instead setting it to the next element in the table.
i have tried extending JTable and overridding the isFocusTraversable() method,with returning false, but this time it takes the focus from the table itself.
i don't want this to happen,what i want want is that the should be intial focus on the JTable and if the selected row and column is the last and hitting the tab key, the focus should go the second JInternal frame.

is it possible,if so how,
thanks in advance,
I agree. Here's the link:
subject: tabbing in JTable
It's not a secret anymore!