is Menu Shortcut Key Down in mouse event - Java Swing

Java examples for Swing:Mouse Event

Description

is Menu Shortcut Key Down in mouse event

Demo Code


//package com.java2s;
import java.awt.Toolkit;
import java.awt.event.MouseEvent;

public class Main {
    public static boolean isMenuShortcutKeyDown(MouseEvent me) {
        return me.getModifiers() == Toolkit.getDefaultToolkit()
                .getMenuShortcutKeyMask();
    }//w ww.j  a va 2 s . com
}

Related Tutorials