I'd add a KeyListener to the JTable to listen for when they press enter.
You must implement it at the top (public class MyClass extends JApplet, implements KeyListener)
and add it to the instance of JTable (table.addKeyListener( this )) and add the following methods:
Code:
public void keyPressed( KeyEvent ke ) { }
public void keyTyped( KeyEvent ke ) { }
public void keyReleased( KeyEvent ke ) { }
So you would probably want to do this in one of those methods:
Code:
if ( ke.getKeyCode() == KeyEvent.VK_ENTER ) {
// code to set focus the specific cell
}
Bookmarks