Hello: Is there a way to set a treeNode that does not currently contain any childern with the closedFolderIcon instead of the leafIcon? Example: If I created a node that allows childern, but is currently empty, I would like to display this node with the closedFolderIcon. This would be similar to an empty directory within a file system. I plan on having a "Add Folder" and "Add Node" button to manipulate the tree. When I add a rootNode to the JTree I get a leafIcon instead of the closedFolderIcon. I only get the closedFolderIcon once I have added a childNode to the rootNode. Any ideas? Thanks, claude jones
Joined: Jan 09, 2001
Hi Claude, Just one. Look at the following code. I have bolded the important items to do what you want.
Joined: Dec 14, 2001
Manfred, Thanks for the reply. That did the trick! claude