aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Jtable Focus Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jtable Focus Problem" Watch "Jtable Focus Problem" New topic
Author

Jtable Focus Problem

vinaya kumar
Ranch Hand

Joined: Jan 20, 2002
Posts: 70
Hello All,
I have two table A and B.
A has 3 Columns X,Y,Z
B has 2 Columns P,Q
After entering a Data in the Column X ,my focus should shift to column P in table B.
And later after filling in Table B , my focus should shift to column Y.
How do i achieve this.
I could not find any API in JTable which will
select a Cell at (row,col) position.
Thanks and Regards
vinaya
Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
Did you look at editCellAt() in JTable?
public boolean editCellAt(int row, int column, EventObject e)
It might be just the thing you need.
HTH,
Joe
vinaya kumar
Ranch Hand

Joined: Jan 20, 2002
Posts: 70
Thanks a Lot...
One more doubt
I saw this editCellAt(row,col,EventObject e)
but what should be the EventObject be
vinaya
Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
I think it can be null. Check the Javadocs.
It used to be passed on to the CellEditor, but
is not passed in later versions of Swing.
HTH,
Joe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jtable Focus Problem