How do I know the current row number when up/down key is pressed?
I try to add a KeyListener, but it doesen't do the job.
jTable.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent e) {
int row = jTable.getSelectedRow();
....
....
}
}
Chinese Java Faq Forum
I try to add a KeyListener, but it doesen't do the job.
jTable.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent e) {
int row = jTable.getSelectedRow();
....
....
}
}
Chinese Java Faq Forum