My experience with capturing images the way dylan202 suggested, was that the quality of images was not up to the mark. Since I needed the images for my presentation.
Another way to get high quality images of your Jung network is to use VectorGraphics library from FreeHEP.
I used this library to generate images in a pdf file. Afterwards I took snapshots of the image from the pdf to my presentation.
JPanel panel = new JPanel ();
panel.setLayout(new FlowLayout());
panel.setBackground(Color.WHITE);
panel.add(vv);
Properties p = new Properties();
p.setProperty("PageSize","A4");
// vv is the VirtualizationViewer
VectorGraphics g = new PDFGraphics2D(new File("Network.pdf"), vv);
g.setProperties(p);
g.startExport();
panel.print(g);
g.endExport();
It is also possible to generate JPEG or other type of files.
For example to generate SVG files only one line needs to be changed:
VectorGraphics g = new SVGGraphics2D(new File("Network.svg"), vv);
For more information see the manual.
Zoomed in snapshot from the PDF file
