Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
            }
        }
        return false;
    }
}