Author: Zafir Anjum
To select a row you have to get the selection model of the JTable and call the setSelectionInterval() function. To select a single row both the start and end indices have to be the same value.
table.getSelectionModel().setSelectionInterval( row, row);
If, instead, you wanted to add a row to a selection, you would use the addSelectionInterval() function in the selection model.
Posted On: 9-Jan-1999