JTree node question
In a JTree node (DefaultMutableTreeNode in my case) how do I show the "expander" object (i.e. the thing you click on to expand a node) even when the node has no children?
I'm trying to create a directory chooser and would always like to display this expander. Only when the user clicks on it would I check the file system and evaluate whether there really is any subdirectory beneath it. If there aren't any only then would I remove the "expander" (exactly the same way windows explorer does it).
I've seen Karsten's JDiskReport do it exactly like that (in his directory chooser dialog), so I know it can be done...but how?