prepareForEditing(); return true;
if (event.getSource() instanceof JTree) { setTree((JTree) event.getSource()); if (event instanceof MouseEvent) { MouseEvent me = (MouseEvent) event; TreePath path = tree.getPathForLocation(me.getX(), me.getY()); ed = lastPath != null && path != null && lastPath.equals(path); if (path != null) { lastRow = tree.getRowForPath(path); Object val = path.getLastPathComponent(); boolean isSelected = tree.isRowSelected(lastRow); boolean isExpanded = tree.isExpanded(path); TreeModel m = tree.getModel(); boolean isLeaf = m.isLeaf(val); determineOffset(tree, val, isSelected, isExpanded, isLeaf, lastRow);
  public boolean isCellEditable(EventObject event)  {     if (editingComponent == null)        configureEditingComponent(tree, renderer, realEditor);        if (editingComponent != null && realEditor.isCellEditable(event))      {        prepareForEditing();        return true;      }    return false;  }