I create a treenode as follows...
DefaultMutableTreeNode n1 = new DefaultMutableTreeNode("mytext,GroupIcon");
Then I use a custom renderer to parse the data to determine what icon to use...
The node shows text "mytext" as it should and the icon is correct. The only problem is when you edit the node (by double-clicking on it), the text changes to the full value of "mytext,GroupIcon". How can I fix this?
Simply changing the icon using another method is not the answer I'm looking for because of other factors.
I tried creating custom node with custom properties like this...
n1.setStrIconType = "Group";
but I couldn't seem to access the custom properties within the custom renderer.
Any help would be appreciated.