Hello All, I want to transfer focus to next component from a table with one column, i add one value to row then i press tab. I expected the focus to shift to next component, but nothing happened, the cell got selected and then when i pressed tab again, row got selected and then now for the third time i pressed tab the focus shifts to the next component. is this problem with jdk1.3.1_01 , how to fix this.
What is happening is the default behavior for a JTable. I think this will solve your problem but I'm not totally sure. There is a method with the following signature which is inherited from JComponent: public boolean isFocusTraversable() This usually returns false but is overridden in JTable to return true. I would try subclassing JTable and overriding the above method and have it return false and see if that works. Good lucl
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Joined: Jan 20, 2002
Thanks Michael, Problems sounds to be have fixed. Now i finding one more problem, my next component is a panel in which is one more table, so now my focus should be on Row 0,column 0. Should there be a focus listener on the table,which on getting focus says editCell(0,0) vinaya