is mouse Left Click - Java Swing

Java examples for Swing:Mouse Event

Description

is mouse Left Click

Demo Code


//package com.java2s;

import java.awt.event.MouseEvent;
import javax.swing.SwingUtilities;

public class Main {
    public static boolean isLeftClick(MouseEvent me) {
        return SwingUtilities.isLeftMouseButton(me) && !me.isControlDown();
    }/*w  ww.  j  av  a 2  s  .c o m*/
}

Related Tutorials