I do not know if this will be of use to anyone but i thought i would just leave it here because i saw a thread where someone asked how to determine if more than one button on a mouse is being pressed and this code below checks to see if both the left button and right button are being pressed at the same time.

if((e.getModifierEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0 && (e.getModifierEx() & (MouseEvent.BUTTON3_DOWN_MASk)) != 0)  
  • use methods from SwingUtilities, because there is mouse with 5 buttons

  • AWTEventListener can returns MouseEvents too

  • have to accept that isn't possible to create two events from Mouse or KeyBoard in the same time