Java examples for java.awt:Robot
Robot move Center
import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; public class Main{ public static void moveCenter() { try {/*from w ww . j a v a2s . c o m*/ Robot robot = new Robot(); robot.mouseMove(SlowMove.SCREEN_W / 2, SlowMove.SCREEN_H / 2); } catch (AWTException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }