Java JTable - Hold selected row.
Posted on 2007-03-26
I'm looking for help with a JTable issue in Java.
I have a read only table which displays rows of info with multiple columns.
When an operator selects a row in the table the selected row is highlighted.
I have written an event handler to say if the operator presses the enter/return button following selection of a row in my table, a secondary dialog is popped up.
All fine up to here........
I cannot find a way to disable the JTable from moving the currently selected row to the next row down in the table following the enter/return button being pressed on a selection in the table.
If anyone knows how to stop the currently selected row from shifting down it would be greatly appreciated.