public void removeSelection(){
  if (TABLE.isEditing()) {
    CellEditor editor=TABLE.getCellEditor();
    editor.cancelCellEditing();
  }
  int[] sel=TABLE.getSelectedRows();
  Arrays.sort(sel);
  for (int counter=sel.length - 1; counter >= 0; counter--) {
    int i=sel[counter];
    DATA_MODEL.remove(i);
  }
  clearSelection();
}

public void removeSelection ( ) { if ( TABLE . isEditing ( ) ) { CellEditor editor = TABLE . getCellEditor ( ) ; editor . cancelCellEditing ( ) ; } int [ ] sel = TABLE . getSelectedRows ( ) ; Arrays . sort ( sel ) ; for ( int counter = sel . length - 1 ; counter >= 0 ; counter -- ) { int i = sel [ counter ] ; DATA_MODEL . remove ( i ) ; } clearSelection ( ) ; }
removes all selected rows from the list and fires deletions through the datamodel cancels any editing that may be occurring prior to updating the model , we must do this since editing will be occuring on the row that will be removed .
