Answers for "how to take screenshot in java"

2

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
0

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 "how to take screenshot in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language