• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to setup data object for JTree?  RSS feed

 
Derek Wang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanna draw a taxonomy tree about car colors in a car domain.
-root(0.0)
--dark(0.5)
---dark grey
---dark blue
--light(0.5)
---white
---silver
--color(0.5)
---yellow
---orange
Also I wanna store all the tree nodes in a text file.And when the system starts,all the elements in the text file will be automatically called to draw a tree.
The reason why I store the tree nodes in the text file is that the tree is user-defined one.The user can draw any trees they can image,no fixed tree model in advance.
Thanks for kind helps!
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Derek Wang:

Thanks for kind helps!

Do you have a question?
If you want to know about reading text files, consult the
I/O Tutorial. If you want to know about JTree, look at Tree Tutorial. Design and implementation are all up to you. If you have a specific problem and need help, we are more than willing to help you figure out an answer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!