Java.awt.Robot class is used to take the control of mouse and keyboard. In this example we will open a notepad and type a message. Please see the self explanatory code below.
Showing posts with label Robot. Show all posts
Showing posts with label Robot. Show all posts
Wednesday, November 6, 2013
Tuesday, October 29, 2013
Java program to take screen shots of your desktop
This example is used to take screen shots of your desktop and save the file in specific format in your machine. This example uses java.awt.Robot class to capture the screen pixels and returns a BufferedImage. Java.awt.Robot class is used to take the control of mouse and keyboard, see API for more options. Once you get the control, you can do any type of operation related to mouse and keyboard through your java code.
Please see the self explanatory java code below. This example takes screen shot of your desktop after an interval of every 5 second, you can customize it as per your requirement.
Please see the self explanatory java code below. This example takes screen shot of your desktop after an interval of every 5 second, you can customize it as per your requirement.
Subscribe to:
Posts (Atom)