- Java
- Development Class
- Robot
Simulate a mouse click
import java.awt.Robot; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; publicclass Main { publicstaticvoid main(String[] argv) throws Exception { Robot robot = new Robot(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); } }
Related examples in the same category