currentCellRenderer = tree.getCellRenderer();  if (currentCellRenderer == null) currentCellRenderer = createDefaultCellRenderer();
{ TreeCellRenderer rend = tree.getCellRenderer(); if (rend != null) { createdRenderer = false; currentCellRenderer = rend; if (createdCellEditor) tree.setCellEditor(null); } else { tree.setCellRenderer(createDefaultCellRenderer()); createdRenderer = true; } } else { currentCellRenderer = null; createdRenderer = false; }
  protected void updateRenderer()  {    if (tree != null)      currentCellRenderer = tree.getCellRenderer();            if (currentCellRenderer == null)              currentCellRenderer = createDefaultCellRenderer();                    updateCellEditor();  }