Opening, writing, saving notepad automatically with Robot class in Java
Java provides a lot of fun while programming. This article shows you how to use Java.awt.Robot class that is both useful and fun. Robot class is used to take the control of mouse and keyboard, which lets you do any mouse and keyboard related operation through java code for the purposes of test automation, self-running demos. The sample code given below demonstrates handling of the keyboard events. When this program is run, it does a series of events automatically. It opens notepad and types ?javajazzup? in it and saves this file as ?robo.txt? automatically.
Now, read details at:
Posted on: October 11, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles