Here you can find the source of isLeftButtonAndNoModifiers(final MouseEvent event)
static boolean isLeftButtonAndNoModifiers(final MouseEvent event)
//package com.java2s; //License from project: Apache License import java.awt.event.InputEvent; import java.awt.event.MouseEvent; import javax.swing.SwingUtilities; public class Main { static boolean isLeftButtonAndNoModifiers(final MouseEvent event) { final boolean leftMouseButton = SwingUtilities.isLeftMouseButton(event); if (leftMouseButton) { final int modifiers = event.getModifiers(); if (InputEvent.BUTTON1_MASK == modifiers) { return true; }//from w w w . j ava2s.c o m } return false; } }