Java Program to Take Screenshots

There might be a situation where you guys want to take screen shots programmatically. So I am sharing a program that help you to take screen capture of your screen and save it in PNG (Portable network graphic) picture format.

Also Read: Java Program to Find IP Address

Java Program to Take Screenshots

The below program uses Java.awt.Robot class to capture the screen pixels and uses ImageIO to save it as PNG image format. Just copy and paste the program in Notepad, save it and run the program to take screen shot.

Note: The Screen shot image will be stored at the location where your program is stored.

Java Program to Take Screenshots

If you liked the article please do share!!


1 thought on “Java Program to Take Screenshots”

Leave a Comment

Your email address will not be published. Required fields are marked *