}
    public void mousePressed(MouseEvent e)     {      ListSelectionModel rowModel = table.getSelectionModel();      ListSelectionModel colModel = table.getColumnModel().getSelectionModel();      int rowLead = rowModel.getLeadSelectionIndex();      int colLead = colModel.getLeadSelectionIndex();      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());      // If we were editing, but the moved to another cell, stop editing      if (rowLead != rowModel.getLeadSelectionIndex() ||          colLead != colModel.getLeadSelectionIndex())        if (table.isEditing())          table.editingStopped(new ChangeEvent(e));    }