Just started to use JGrapht. It's an excelent library, and very usefull for
I would like to know how can I visualize a graph I've created by JGrapht on
a swing window, just for debugging purposes of my code.
The JGrapht site suggests me to use JGraph (that have its name altered to
JGraphx, I think), but the sample code doesn't even compile.
As indicated on site, as a starting point I tried to use:
*// create a JGraphT graph*
ListenableGraph g = *new* ListenableDirectedGraph( DefaultEdge.class );
*// create a visualization using JGraph, via the adapter*
JGraph jgraph = *new* JGraph( *new* JGraphModelAdapter( g ) );
but this code produces compilation errors.
I'm using last version of both JGraph and JGraphx, as obtained from his
Can someone give me some hint or sample?
Sorry about poor english. It's not my native language...
Nilo Roberto C Paim
TinyCobol Development Team
Brasília - DF - Brazil