List of usage examples for java.awt Component paintAll
public void paintAll(Graphics g)
From source file:Main.java
public static BufferedImage createImage(Component comp) { if (comp == null) return null; BufferedImage image = (BufferedImage) comp.createImage(comp.getWidth(), comp.getHeight()); Graphics g = image.createGraphics(); comp.paintAll(g); return image; }