void () { int[] selectedRows = myTable.getSelectedRows(); myTable.getSelectionModel().removeListSelectionListener(myListSelectionListener); myTableModel.fireTableDataChanged(); for (int selectedRow : selectedRows) { myTable.addRowSelectionInterval(selectedRow, selectedRow); } myTable.getSelectionModel().addListSelectionListener(myListSelectionListener); }