1

I would like to create a graphical tree in java like this binary tree:

binary tree

I used JTree, but all I could have was a file tree:

file tree

I would love to have my tree vertical, and it would be great if the child nodes were at both sides of the parent node instead of being always on the same side.

Thank you for reading this.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Caz
  • 81
  • 1
  • 6
  • 1
    You could do that with a custom `TreeUI` implementation but in terms of usability that would not make much sense. Users are used to having trees the way they are. – Thomas May 01 '12 at 07:06
  • Possible duplicate of [How to draw a tree in java langage](http://stackoverflow.com/questions/10016437/how-to-draw-a-tree-in-java-langage) – trashgod May 01 '12 at 09:10

1 Answers1

1

I think you want to represent your data in hierarchical. If so there is an existing post on this.

How to display tree hierarchy in Java?

Community
  • 1
  • 1
Seshagiri
  • 728
  • 5
  • 10