posted 23 years ago
Hello,
I am adding folders and leaves to a JTree dynamical. The problem I am having is the placement of the folders when adding them to the tree.
For example, if I had 4 leaves and 4 folders under a rootNode, I would like all folders first and the leaves following.
Good:
RootNode
- Folder 1
- Folder 2
- Folder 3
- Folder 4
- Leaf 1
- Leaf 2
- Leaf 3
- Leaf 4
Bad:
RootNode
- Folder 1
- Leaf 1
- Leaf 2
- Leaf 3
- Folder 2
- Folder 3
- Leaf 4
- Folder 4