The attached testcase demonstrates the java.awt.event.MouseEvent internally knows about the middle and right mouse buttons (because the correct data shows up in event.toString()).
However, querying those values via getButton() or getModifiers() or InputEvent.isAltDown() / isMetaDown() always returns false. This makes it impossible to detect middle/right button clicks in user programs. Testcase usage: compile and run, then try mouse-clicks on the frame using all mouse buttons and the (shift/alt/meta/control)-key+button1 variants. Might use java.awt.Robot to automate... -- Summary: MouseEvent ignores Button2 and Button3 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: AWT AssignedTo: fitzsim at redhat dot com ReportedBy: hendrich at informatik dot uni-hamburg dot de CC: fitzsim at redhat dot com,gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19842