boolean isLeaf = tree.getModel().isLeaf(val); boolean expanded = tree.isExpanded(editingPath); editingComponent = ed.getTreeCellEditorComponent( tree, val, true, expanded, isLeaf, editingRow);
	protected boolean startEditing(TreePath path, MouseEvent event)	{    int x;    int y;    if (event == null)      {        Rectangle bounds = getPathBounds(tree, path);        x = bounds.x;        y = bounds.y;      }    else      {        x = event.getX();        y = event.getY();      }        TreeCellEditor ed = getCellEditor();    if (ed == null)      updateCellEditor();    if(ed != null && ed.isCellEditable(event) && ed.shouldSelectCell(event))      {        editingPath = path;        editingRow = tree.getRowForPath(editingPath);        Object val = editingPath.getLastPathComponent();        boolean isLeaf = tree.getModel().isLeaf(val);        boolean expanded = tree.isExpanded(editingPath);        editingComponent = ed.getTreeCellEditorComponent(                     tree, val, true, expanded, isLeaf, editingRow);        cellEditor.addCellEditorListener(cellEditorListener);        stopEditingInCompleteEditing = false;        return true;      }		return false;	}