Example usage for java.awt Container paintAll

List of usage examples for java.awt Container paintAll

Introduction

In this page you can find the example usage for java.awt Container paintAll.

Prototype

public void paintAll(Graphics g) 

Source Link

Document

Paints this component and all of its subcomponents.

Usage

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);
}