public static boolean isMiddleMouseButton(MouseEvent anEvent){
  return (anEvent.getModifiersEx() & InputEvent.BUTTON2_DOWN_MASK) > 0;
}

public static boolean isMiddleMouseButton ( MouseEvent anEvent ) { return ( anEvent . getModifiersEx ( ) & InputEvent . BUTTON2_DOWN_MASK ) > 0 ; }
replaces swingutilities # ismiddlemousebutton ( ) due to the fact that button2_mask = = event . alt_mask
