From: Nilo <nil...@gm...> - 2012-10-19 14:01:41
|
Hi all. Just started to use JGrapht. It's an excelent library, and very usefull for my needs. 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 respective sites. Can someone give me some hint or sample? Sorry about poor english. It's not my native language... TIA, -- Nilo Roberto C Paim TinyCobol Development Team Brasília - DF - Brazil |