• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFC--- Graphics  RSS feed

 
mikku Dubey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
plz help me out in acheiving the following:
i have made some algorithms for decision tree.
i want that after the whole code runs it should show graphically the picutre of decision tree showing root nodes, leaf nodes connected by arrows(which represent link).
How to do it?
rasp
 
Rene Liebmann
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
do you want to use a ready Component like JTree, where you fill all your data in a model or do you want to draw it by your own. Both is possible.
Maybe using JTree would be better in your case.
The tree itself can have only one root, but if you need more, then you can hide the root, so that it looks like the tree has more than one root nodes.
If you want to draw it by your own, then you should hava a look to Java2D API. There are lots of examples, but I would start with the Tutorial from SUN (in both cases)
Regards
Rene
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!