validCachedPreferredSize = false; tree.revalidate(); tree.repaint();
    public void editingStopped(ChangeEvent e)    {      editingPath = null;      editingRow = -1;      stopEditingInCompleteEditing = false;      if (editingComponent != null)        {          tree.remove(editingComponent.getParent());          editingComponent = null;        }      if (cellEditor != null)        {          newVal = ((JTextField) getCellEditor().getCellEditorValue()).getText();          completeEditing(false, false, true);          if (cellEditor instanceof DefaultTreeCellEditor)            tree.removeTreeSelectionListener((DefaultTreeCellEditor) cellEditor);          cellEditor.removeCellEditorListener(cellEditorListener);          setCellEditor(null);          createdCellEditor = false;        }      isEditing = false;      tree.requestFocusInWindow(false);      editorTimer.stop();    }