Java Robot.waitForIdle()
Syntax
Robot.waitForIdle() has the following syntax.
public void waitForIdle()
Example
In the following code shows how to use Robot.waitForIdle() method.
//from www. ja v a2 s . c om
import java.awt.Robot;
import java.awt.event.KeyEvent;
public class Main {
public static void main(String[] argv) throws Exception {
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_A);
robot.waitForIdle();
robot.keyRelease(KeyEvent.VK_A);
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »