java take screenshot

Solutions on MaxInterview for java take screenshot by the best coders in the world

showing results for - "java take screenshot"
Linus
16 Feb 2020
1BufferedImage image = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
2ImageIO.write(image, "png", new File("/screenshot.png"));
3