I have recognized that each time I initiate the second LEFT mouse click on a node it changes it’s representation to the toString() value of its object.
Under the object I mean the second parameter of the method:
getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
It’s not necessarily a double click. The pause between two clicks can be several minutes.
When after that I click on another node, the value changes back to its previous value.
Has anybody faced the same problem? Thanks in advance
You made your tree editable, but you didn’t specify any editor for the tree. So it uses the default editor, which uses the
toString()method of your ContentNode to edit the node.You probably don’t want your tree to be editable.