Java examples for java.awt:Robot
Robot right Click
//package com.java2s; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.MouseEvent; public class Main { public static void rightClick() { try {/*from w w w.jav a 2s . c om*/ Robot robot = new Robot(); robot.mousePress(MouseEvent.BUTTON3_DOWN_MASK); robot.mouseRelease(MouseEvent.BUTTON3_DOWN_MASK); } catch (AWTException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }