if (rowLead != rowModel.getLeadSelectionIndex() || colLead != colModel.getLeadSelectionIndex()) if (table.isEditing()) table.editingStopped(new ChangeEvent(e));
    public void mousePressed(MouseEvent e)     {      begin = new Point(e.getX(), e.getY());      curr = new Point(e.getX(), e.getY());      //if control is pressed and the cell is already selected, deselect it      if (e.isControlDown() && table.          isCellSelected(table.rowAtPoint(begin),table.columnAtPoint(begin)))        {                                                 table.getSelectionModel().            removeSelectionInterval(table.rowAtPoint(begin),                                     table.rowAtPoint(begin));          table.getColumnModel().getSelectionModel().            removeSelectionInterval(table.columnAtPoint(begin),                                     table.columnAtPoint(begin));        }      else      updateSelection(e.isControlDown());          }