Posted Thursday, July 14, 2005 @ 07:45:44
I would like to change the default cell navigation behaviour. Actually if I press enter the selection move from the top to the bottom and from the left to the right of the table. When I press vk_enter i would like change the behaviour so the navigations wil be from the left to thwe right and from the top to the bottom. I add a keylistener waiting for the vk_enter with this code but without luck......
Now the cursor move well fro the left to the right but everytime I press vk_enter the row change to the next.
So I invented the "table diagonal navigation"
How can I do this ??
class moveKey implements java.awt.event.KeyListener{
public void keyPressed(java.awt.event.KeyEvent e){
}
public void keyTyped(java.awt.event.KeyEvent e){
}
public void keyReleased(java.awt.event.KeyEvent e){
if(e.getKeyCode()==10){
table.selectCell(table.getSelectedRow(), table.getSelectedColumn()+1);
table.getTable().changeSelection(table.getSelectedRow(), table.getSelectedColumn()+1,false,false);
}
}
}