Java examples for Swing:Mouse Event
is Mouse Button Right Click
//package com.java2s; import java.awt.event.MouseEvent; import javax.swing.SwingUtilities; public class Main { public static boolean isRightClick(MouseEvent me) { return SwingUtilities.isRightMouseButton(me) || (SwingUtilities.isLeftMouseButton(me) && me .isControlDown()); }/* w w w. java 2 s . c o m*/ }