Graph Control in Java/Netbeans? Does it exist?

2019-04-16 20:08发布

问题:

Is it possible that anyone has a link to a graph class/library that I can use to produce a graph in Java?

Thanks for any help!

回答1:

My top choice would be JGraph as others have suggested; I am using JGraph5 because it is better documented than the newer alternative, JGraphX. EDIT: JGraphX turns out to be the far superior version, despite the lack of documentation. It's not that hard to figure out.

JGraph

  • Demonstration app
  • Feature list
  • Licensing agreement

Other alternatives I've researched:

JGraphT

"JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms...complete source code included, under the terms of the GNU Lesser General Public License." (http://jgrapht.sourceforge.net/)

  • Main project repository
  • Example visualizations

JUNG - Java Universal Network/Graph Framework

Main project repository

yEd Graph Editor

  • Implementation of yFiles library
  • Demonstration Java applet
  • About yEd
  • Saves graphs in GraphML format


回答2:

I used JGraph as a visualizer for networks of nodes/topologies at my previous job, it's not half bad once you get past the architecture (it's a big state machine if I recall correctly).



回答3:

Visual graph: JFreeChart

You may also wish to consider the Google Charts API, if you can make web service requests.



回答4:

A really good alternative is to used the Google Charts API. Platform independent, easy to use, and fast processing (done on Google Server side)



回答5:

graphviz would be my choice. It's not Java, but still terrific and easy to use.

There is a Java component that works with dot to generate graphs. I've used it - very nice, indeed.



回答6:

I would recommend JGraphT. I used it to create multi-leveled graphs in my dissertation and as the base of a GPS Routing Software, understanding what is going on I found a bit of a mind bender, but once looking at how the algorithms package works I found it quite easy to implement A*/D* heuristic algorithms. For working out the distance between nodes on the graph I'd also recommend looking at the Haversine function, if that's your thing.