How to display tree hierarchy in Java?

后端 未结 4 542
滥情空心
滥情空心 2021-01-05 02:15

I have a table in a database named \"Process\"

This process table has 3 fields:

  • process_id
  • process_name
  • process_parent_id
4条回答
  •  半阙折子戏
    2021-01-05 02:31

    Re Q1: You could find on internet resources several Java implementations of Tree structure, for example this generic tree.

    Re Q2: One alternative is using JTree. Check the Java Tutorial trail on How to use Trees

    JGraphT could be a good starting point to build something like your example. Check the demo at http://jgrapht.sourceforge.net/visualizations.html

提交回复
热议问题