-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.4.2
-
x86
-
linux
Name: dk106046 Date: 07/14/2003
Run the following & press space bar rapidly.
===================================================================
/*
* CheckBoxGroupTest.java
*/
import java.awt.*;
import java.awt.event.*;
public class CheckBoxGroupTest extends Frame implements ItemListener {
CheckBoxGroupTest() {
Checkbox c;
setLayout(new GridLayout(1, 0));
CheckboxGroup cbg = new CheckboxGroup();
c = new Checkbox("one", cbg, false);
c.addItemListener(this);
add(c);
c = new Checkbox("two", cbg, false);
c.addItemListener(this);
add(c);
c = new Checkbox("three", cbg, false);
c.addItemListener(this);
add(c);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent event) {
System.exit(0);
}
});
pack();
show();
}
public void itemStateChanged(ItemEvent e) {
System.out.print(getName()+":");
System.out.println(e.paramString());
dispose();
new CheckBoxGroupTest();
}
public static void main(String[] args) {
new CheckBoxGroupTest();
}
}
===================================================================
Sometimes the space goes through to the console & so the event doesn't occur.
[This bug is being submitted as a courtesy, in order to maintain uniformity between Sun & IBM JDKs. It has been fixed in IBM JDKs. Please contact ###@###.### if you have questions.]
======================================================================