List of usage examples for java.awt Container paintAll
public void paintAll(Graphics g)
From source file:org.jcurl.demo.tactics.JCurlShotPlanner.java
private static void renderPng(final Container src, final File dst) throws IOException { final BufferedImage img = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_ARGB); final Graphics g = img.getGraphics(); try {// ww w .j a v a 2 s . co m // SwingUtilities.paintComponent(g, src, src.getBounds(), null); src.paintAll(g); } finally { g.dispose(); } ImageIO.write(img, "png", dst); }