List of usage examples for java.awt.event MouseEvent getMouseModifiersText
@SuppressWarnings("deprecation") public static String getMouseModifiersText(int modifiers)
From source file:Main.java
public Main() { setLayout(null);//from ww w.j a va2 s . c om add(button); button.setSize(button.getPreferredSize()); button.setLocation(20, 20); addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent event) { System.out.println(MouseEvent.getMouseModifiersText(event.getModifiers())); } }); }