setTree(tree); this.renderer = renderer;  if (editor == null) editor = createTreeCellEditor(); else editor.addCellEditorListener(new RealEditorListener());  realEditor = editor;  lastPath = tree.getLeadSelectionPath(); tree.addTreeSelectionListener(this); editingContainer = createContainer(); setFont(UIManager.getFont("Tree.font")); setBorderSelectionColor(UIManager.getColor("Tree.selectionBorderColor")); editingIcon = renderer.getIcon();
this(tree, renderer, null);
  public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer,                               TreeCellEditor editor)  {    setTree(tree);    this.renderer = renderer;        if (editor == null)      editor = createTreeCellEditor();    else      editor.addCellEditorListener(new RealEditorListener());        realEditor = editor;        lastPath = tree.getLeadSelectionPath();    tree.addTreeSelectionListener(this);    editingContainer = createContainer();    setFont(UIManager.getFont("Tree.font"));    setBorderSelectionColor(UIManager.getColor("Tree.selectionBorderColor"));    editingIcon = renderer.getIcon();  }