You can use the Tree classes from Swing even if you don't have a GUI. See if any implementation of TreeNode works for you, or make your own. If you get stuck, post some code and we'll try to bump you along.
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
I used the implementations of binary tree to create my tree (not binary). I just removed the normal left and right children with array list to have more than one child
Thanks all.
Maha
Get me the mayor's office! I need to tell him about this tiny ad:
a bit of art, as a gift, the permaculture playing cards