if (clickCount == 2 || cntlClick == true)
if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row))
    public void mousePressed(MouseEvent e)    {			Point click = e.getPoint();         int row = Math.round(click.y / BasicTreeUI.this.getRowHeight());      TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x,                                                                 click.y);         if (path != null)         {            boolean inBounds = false;            boolean cntlClick = false;            Rectangle bounds = BasicTreeUI.this.getPathBounds(                                                            BasicTreeUI.this.tree,                                                            path);                      bounds.x -= rightChildIndent - 4;            bounds.width += rightChildIndent + 4;            if (bounds.contains(click.x, click.y))               inBounds = true;            else if (BasicTreeUI.this.hasControlIcons()                   && (click.x < (bounds.x - rightChildIndent + 5)                        && click.x > (bounds.x - rightChildIndent - 5)))               cntlClick = true;          if ((inBounds || cntlClick) && BasicTreeUI.this.tree.isVisible(path))            {               if (!cntlClick && !BasicTreeUI.this.isLeaf(row))               {                  Object cell = path.getLastPathComponent();                  if (lastClicked != null && lastClicked.equals(cell))                     clickCount = 2;                  else         {                                lastClicked = cell;                     clickCount = 1;                  }               }               if (clickCount == 2 || cntlClick == true)         {               clickCount = 0;                  lastClicked = null;                  BasicTreeUI.this.tree.getSelectionModel().clearSelection();            if (BasicTreeUI.this.tree.isExpanded(path))               BasicTreeUI.this.tree.collapsePath(path);            else               BasicTreeUI.this.tree.expandPath(path);			}                        BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path);                            // If editing, but the moved to another cell then stop editing              if (!path.equals(BasicTreeUI.this.tree.getLeadSelectionPath()))                if (BasicTreeUI.this.tree.isEditing())                  BasicTreeUI.this.tree.stopEditing();		}      }      }