Skip to content

Instantly share code, notes, and snippets.

@Vanilton18
Created March 30, 2016 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vanilton18/23084df3512185b4f82dcb5876a9c626 to your computer and use it in GitHub Desktop.
Save Vanilton18/23084df3512185b4f82dcb5876a9c626 to your computer and use it in GitHub Desktop.
Robot robot = new Robot();
BufferedImage theImage = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(theImage, "png", new File("C:\\myPic"+Integer.toString(turn)+".png"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment