The java.awt.Robot class provides several opportunities for fun. One opportunity involves building a screen-capture utility. This Java Fun and Games installment presents a utility that uses Robot to capture the contents of the primary screen device.
The Robot class makes it possible for your Java program to temporarily take control of the mouse and keyboard input functionality at the operating-system level.
Programming in Java doesn't have to be dull and boring. In fact, it's possible to have a lot of fun while programming in Java. This is the third lesson in a short miniseries that shows you how to use the Robot class to write programs that are both fun and useful.
"This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations."