Hierarchical tree diagram on the web

Posted on 2004-11-10
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
    LVL 4

    Accepted Solution

    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
    LVL 6

    Assisted Solution

    LVL 2

    Author Comment


    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now