void updateCellRangeByTableSelection(JTable contentTable){
  int columnIndexStart=contentTable.getSelectedColumn();
  int rowIndexStart=contentTable.getSelectedRow();
  int columnIndexEnd=columnIndexStart + contentTable.getSelectedColumnCount() - 1;
  int rowIndexEnd=rowIndexStart + contentTable.getSelectedRowCount() - 1;
  setCellRangeSelection(new CellRangeSelection(columnIndexStart,rowIndexStart,columnIndexEnd,rowIndexEnd));
}

void updateCellRangeByTableSelection ( JTable contentTable ) { int columnIndexStart = contentTable . getSelectedColumn ( ) ; int rowIndexStart = contentTable . getSelectedRow ( ) ; int columnIndexEnd = columnIndexStart + contentTable . getSelectedColumnCount ( ) - 1 ; int rowIndexEnd = rowIndexStart + contentTable . getSelectedRowCount ( ) - 1 ; setCellRangeSelection ( new CellRangeSelection ( columnIndexStart , rowIndexStart , columnIndexEnd , rowIndexEnd ) ) ; }
uses the current table selection to update the cell range selection .
