public class ScreenImage extends Object
| Constructor and Description |
|---|
ScreenImage() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
createDesktopImage()
Convenience method to create a BufferedImage of the desktop
|
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.
|
static void |
writeImage(BufferedImage image,
String fileName)
Write a BufferedImage to a File.
|
public static BufferedImage createImage(JComponent component)
public static BufferedImage createImage(JComponent component, Rectangle region)
public static BufferedImage createDesktopImage() throws AWTException, IOException
AWTException - see Robot class constructorsIOException - if an error occurs during writingpublic 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 writeImage(BufferedImage image, String fileName) throws IOException
image - image to be writtenfileName - name of file to be createdIOException - if an error occurs during writingCopyright © 2008–2019 Rob Camick. All rights reserved.