View RSS Feed

Java AWT

Robot class Control functions

Rate this Entry
by , 03-04-2012 at 11:46 AM (670 Views)
Robot class uses these control functions:

Mouse control functions

void mouseMove(int x, int y):To coordinate (x,y), mouse cursor is moved by using this function. At screen’s top corner (left), coordinated are shown.
Java Code:
void mousePress(int buttons)
void mouseRelease(int button)
Button clicks are performed by this function pair. Input arguments are as following:
java.awt.event.InputEvent.BUTTON1_MASK   // left mouse button 
java.awt.event.InputEvent.BUTTON2_MASK   // middle mouse button
java.awt.event.InputEvent.BUTTON3_MASK   // right mouse button
Control functions of keyboard.
To do keyboard controlling, functions used are as following:
Java Code:
void keyPress(int keycode)
void keyRelease(int keycode)
Functions of utility
To wait/ sleep at thread, consider these utility functions
Java Code:
void delay(int ms)
void waitForIdle()

Submit "Robot class Control functions" to Facebook Submit "Robot class Control functions" to Digg Submit "Robot class Control functions" to Submit "Robot class Control functions" to StumbleUpon Submit "Robot class Control functions" to Google

Updated 03-04-2012 at 12:07 PM by Java AWT