Answers for "screenshot java"


java take screenshot

BufferedImage image = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(image, "png", new File("/screenshot.png"));
Posted by: Guest on October-28-2020

java take and save screenshot

Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
BufferedImage capture = new Robot().createScreenCapture(screenRect);
ImageIO.write(capture, "bmp", new File(args[0]));
Posted by: Guest on November-28-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language