We\'re seeing JTable selection get cleared when we do a fireTableDataChanged() or fireTableRowsUpdated() from the TableModel.
JTable
fireTableDataChanged()
fireTableRowsUpdated()
TableModel
for reference, as @Swapnonil Mukherjee stated, this did the trick with a table with selectable rows:
// preserve selection calling fireTableDataChanged() final int[] sel = table.getSelectedRows(); fireTableDataChanged(); for (int i=0; i