Not many people appreciate that TreeModel is actually deliberately GUI-agnostic. If you look at, for example, DefaultMutableTreeModel, you'll see that despite being in the Swing class hierarchy, it makes no reference at all to Swing components. I'm not saying it's the most elegant tree data structure in the world, but the price is right and it serves.
TreeModel is probably it. If you find it entertaining to make your own, a Node with references to LeftNode and RightNode or maybe a collection of ChildNodes is pretty easy to get going.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Aug 10, 2006
Thanks Mr.Stans. Probaly the time has come for the opensource community to think about this requirement and make a framework for modeling a tree hieararchy. I am open for that. I will try to create a project in open source for this purpose and will post the details here in this forum. It will be very helpful if most java developers get involved in the thought process and make that framework a success.