How to read GXL graph?

Z

Zak

Hi,

I just downloaded JGraph (5.10.1.0) & JGraphPad (5.10.0.2).
I would like to visualise a GXL file. I tried using the following
code:

Code:
JGraph graph = new JGraph();
FileImportGXL.parseGXLFileInto("Basic_Example.gxl", graph);


After this, when I use the following code to render the graph, I get
the std. output.

Code:
JFrame frame = new JFrame();
frame.getContentPane().add(new JScrollPane(graph));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);


When I read through the API, it seems that I have to implement
GraphModel and provide as parameter to JGraph object. Is this correct?
Or is there a simpler way to do this??

Could someone pls. tell me a simple way to visualise a GXL graph using
JGraph or any other tool for that matter!

Thanks in advance,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top