I am using JTable
with MULTIPLE_INTERVAL_SELECTION
when I call
int[] selectedRows = jtable.getSelectedRows();
I am getting array of selected rows indexes like 5,6,8
for eg. Now In case of error I want to maintain same selection.
I am trying
_selectionModel.setSelectionInterval(selectedRows[0], selectedRows[selectedRows.length-1]);
but it is selecting rows from 5 to 8 how can I avoid to select row number 7 which wasn't selected before?