public class ComponentImageCreator extends Object
| Constructor and Description |
|---|
ComponentImageCreator() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
createImage(Component component) |
static BufferedImage |
createImage(JComponent component) |
static BufferedImage |
createImage(JComponent component,
Rectangle region) |
static BufferedImage |
createImage(Rectangle region)
Create a BufferedImage from a rectangular region on the screen.
|
BufferedImage |
getImage(JComponent toPaint) |
static void |
layoutComponent(Component component)
Needed to layout components before painting for the video
|
static void |
main(String[] args) |
public BufferedImage getImage(JComponent toPaint)
public static void layoutComponent(Component component)
component - public static BufferedImage createImage(JComponent component)
public static BufferedImage createImage(JComponent component, Rectangle region)
public static BufferedImage createImage(Component component) throws AWTException
AWTExceptionpublic static BufferedImage createImage(Rectangle region) throws AWTException
region - region on the screen to create image fromAWTException - see Robot class constructorspublic static void main(String[] args)