[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Hierarchical tree diagram on the web

Posted on 2004-11-10
Medium Priority
Last Modified: 2012-06-21
Hi Java Experts:

I'm developing a web based HR application system on J2EE plateforms.
I'm asked to draw a hierarchical diagram of enterprise organizations(departments)
which may look like a Visio diagram.
All child departments should be spreaded horizontally under the parent department
and branch line connections are needed between the related parent-child pairs.
In addition to the department name, depending on the query conditions,
employee names under the department may be needed also.
Note that the tree depth in the diagram may be up to 10,
and physical paper printing may be needed.

I think there may be some acceptable solutions to draw the diagram:
(1) Use HTML Table
(2) Use a java component (bean) to generate a JPG,GIF file and then put it on the JSP.
(3) Generate visio data format files and then use Visio MIME-Type in the JSP.

How do you experts think about it ?
Do you have any good idea ?

Sample programs, hyper links, or documentations are appreciated.

Thanks in advance.

Question by:AlbertYou

Accepted Solution

gdrnec earned 525 total points
ID: 12551982
You are talking about building a directed graph. There a re a number of ways of doing this but the best solution for an abstract and algorithimic approach is at:


It is open source and well documented

Assisted Solution

CodingExperts earned 525 total points
ID: 12552366

Author Comment

ID: 12779459

Hi gdrnec, and CodingExpert :

I'v seen and tried your comments.
Finally, I'v decided to work it out with nested HTML tables.

However, I think both of your comments are worth of earning the points.

Thanks a lot.


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question