FULL PRODUCT VERSION :
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux hp-elitebook 2.6.35-31-generic #63-Ubuntu SMP Mon Nov 28 19:29:10 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.10
EXTRA RELEVANT SYSTEM CONFIGURATION :
Mouse used:
Microsoft IntelliMouse explorer 4.0 USB/PS2 compatible
connected to the USB 3.0 port
A DESCRIPTION OF THE PROBLEM :
When using mouse scrolling button with 'horizontal scrolling' feature, a message is printed 2 times on the standard output every time, the horizontal scroll button is pressed.
The message printed: "MEvent. CASE!"
This seems to be the relevant code:
jdk1.7.0_02/java/awt/event/MouseEvent.java
line 761 in the
public MouseEvent(Component source, int id, long when, int modifiers,
int x, int y, int xAbs, int yAbs,
int clickCount, boolean popupTrigger, int button)
method:
if (getModifiersEx() != 0) { //There is at least one more button in a pressed state.
if (id == MouseEvent.MOUSE_RELEASED || id == MouseEvent.MOUSE_CLICKED){
System.out.println("MEvent. CASE!");
shouldExcludeButtonFromExtModifiers = true;
}
}
This was not an issue in older versions of JDK (at least in the 1.6.0.26)
REGRESSION. Last worked in version 7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
create a swing application and try to horizontal scroll above the window. Watch the standard output from the application
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Nothing is printed on the standard output
ACTUAL -
message "MEvent. CASE!" is printed on the standard output 2x for each 'button press'
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
class Test extends JFrame {
public static void main(String[] args) {
Test test = new Test();
test.setSize(200,200);
test.setVisible(true);
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
---------- END SOURCE ----------
SUPPORT :
YES