Robot robot=new Robot();
Dimension dimension= Toolkit.getDefaultToolkit().getScreenSize();
Rectangle rectangle=new Rectangle(dimension);
BufferedImage img= robot.createScreenCapture(rectangle);
File f=new File("D://RobotScreenshot1.png");
ImageIO.write(img,"png", f);
I Storing the image in "D://RobotScreenshot1.png" this location.
Top comments (0)