Archives: AWT

Java AWT – Getting Data from Computer Clipboard

Java AWT – Robot Class Example

Java.awt.Robot class is used to take the control of mouse and keyboard. Once you get the control, you can do any type of operation related to mouse and keyboard through your java code. This class is used generally for test automation.

This sample code will show the use of Robot class to handle the keyboard events. If you run this code and open a notepad then this code will write ‘hi budy’ in the notepad.

Java AWT – Get Location of Mouse Pointer