DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); editor.addCellEditorListener(new RealEditorListener()); editor.setClickCountToStart(CLICK_COUNT_TO_START);
Border border = UIManager.getBorder("Tree.editorBorder"); JTextField tf = new DefaultTreeCellEditor.DefaultTextField(border); DefaultCellEditor editor = new DefaultCellEditor(tf); editor.setClickCountToStart(1);
  protected TreeCellEditor createTreeCellEditor()  {    DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField(                                  UIManager.getBorder("Tree.selectionBorder")));    editor.addCellEditorListener(new RealEditorListener());    editor.setClickCountToStart(CLICK_COUNT_TO_START);    realEditor = editor;    return editor;  }