I want to draw some graphs including vertices and edges in my application. I found that JGraph is a good library for plotting graphs. I went through some online sources about it but couldn't find any relevant articles about how to embed a JGraph in a Swing application. (Showing a JGraph in a JFrame
etc). Can Any one help me with that?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Maybe what you're looking for is G.
This code worked for me:
If you want the whole sample i can upload it too.
I think the code must be a modified sample from the site. Here you go:
This is a very simple example. I have done a few complicated graphs of database data, but ended up working with Jung2 which fits my needs better.
JGraph
includes the packagescom.mxgraph.examples.swing
andcom.mxgraph.examples.swing.editor
in the examples folder: