-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.9-1.681_FC3 #1 Thu Nov 18 15:10:10 EST 2004 i686 i686 i386 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
gnome-libs-1.4.1.2.90-44
A DESCRIPTION OF THE PROBLEM :
Multiple java.awt.event.ComponentEvent are delivered on programatic resizes of a JFrame on Linux (tested on Fedora Core 3 as described above). Manual resizes appear to generate only one event correctly.
In Windows environments the behavior is correct, i.e., only one java.awt.event.ComponentEvent is delivered for resizes (tested in Windows XP).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
A ComponentListener will receive two ComponentEvents for each setSize call in the source.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Only one ComponentEvent should be generated for each setSize call.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import javax.swing.JFrame;
public class ComponentListenerLinuxBug extends JFrame {
public ComponentListenerLinuxBug() {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
ComponentListener componentListener = new ComponentListener() {
public void componentResized(ComponentEvent e) {
System.out.println(e);
}
public void componentMoved(ComponentEvent e) { }
public void componentShown(ComponentEvent e) { }
public void componentHidden(ComponentEvent e) { }
};
addComponentListener(componentListener);
}
public static void main(String[] args) {
ComponentListenerLinuxBug instance = new ComponentListenerLinuxBug();
instance.setSize(300,300);
instance.setVisible(true);
instance.setSize(500,500);
instance.setSize(800,600);
}
}
---------- END SOURCE ----------
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.9-1.681_FC3 #1 Thu Nov 18 15:10:10 EST 2004 i686 i686 i386 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
gnome-libs-1.4.1.2.90-44
A DESCRIPTION OF THE PROBLEM :
Multiple java.awt.event.ComponentEvent are delivered on programatic resizes of a JFrame on Linux (tested on Fedora Core 3 as described above). Manual resizes appear to generate only one event correctly.
In Windows environments the behavior is correct, i.e., only one java.awt.event.ComponentEvent is delivered for resizes (tested in Windows XP).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
A ComponentListener will receive two ComponentEvents for each setSize call in the source.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Only one ComponentEvent should be generated for each setSize call.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import javax.swing.JFrame;
public class ComponentListenerLinuxBug extends JFrame {
public ComponentListenerLinuxBug() {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
ComponentListener componentListener = new ComponentListener() {
public void componentResized(ComponentEvent e) {
System.out.println(e);
}
public void componentMoved(ComponentEvent e) { }
public void componentShown(ComponentEvent e) { }
public void componentHidden(ComponentEvent e) { }
};
addComponentListener(componentListener);
}
public static void main(String[] args) {
ComponentListenerLinuxBug instance = new ComponentListenerLinuxBug();
instance.setSize(300,300);
instance.setVisible(true);
instance.setSize(500,500);
instance.setSize(800,600);
}
}
---------- END SOURCE ----------