}
    private void updateSelection(boolean controlPressed)    {      // Update the rows          int lo_row = table.rowAtPoint(begin);          int hi_row  = table.rowAtPoint(curr);          ListSelectionModel rowModel = table.getSelectionModel();          if (lo_row != -1 && hi_row != -1)            {              if (controlPressed && rowModel.getSelectionMode()                   != ListSelectionModel.SINGLE_SELECTION)                rowModel.addSelectionInterval(lo_row, hi_row);              else            rowModel.setSelectionInterval(lo_row, hi_row);        }      // Update the columns          int lo_col = table.columnAtPoint(begin);          int hi_col = table.columnAtPoint(curr);          ListSelectionModel colModel = table.getColumnModel().            getSelectionModel();          if (lo_col != -1 && hi_col != -1)            {              if (controlPressed && colModel.getSelectionMode() !=                   ListSelectionModel.SINGLE_SELECTION)                colModel.addSelectionInterval(lo_col, hi_col);              else            colModel.setSelectionInterval(lo_col, hi_col);        }    }