Following example shows how to simulate movement of the cursor using java.awt.Robot class in Java. Mainly, mouseMove method is used with the parameters specifying target point to move the cursor.

 try {
    // These coordinates are screen coordinates
    int xCoord = 500;
    int yCoord = 500;
    // Move the cursor
    Robot robot = new Robot();
    robot.mouseMove(xCoord, yCoord);
} catch (AWTException e) {