@Override public void tableChanged(final TableModelEvent e){
  inTableChange=true;
  try {
    super.tableChanged(e);
  }
  finally {
    inTableChange=false;
  }
  restoreSelection();
}

@ Override public void tableChanged ( final TableModelEvent e ) { inTableChange = true ; try { super . tableChanged ( e ) ; } finally { inTableChange = false ; } restoreSelection ( ) ; }
the sorting model will loose the currently selected row . so we need to restore the selection after it has updated
