-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1.6, 1.1.8_003
-
generic
-
generic
Name: eyC74480 Date: 03/03/98
This bug report came from Oracle Corp. JavaSoft Licensee.
======================================================================
john.stampfl@eng 1999-05-11
received testcase from Oracle
/*This is JavaSoft licensee Oracle Corp.
If setVisible() is called on a component that has a ComponentListener
attached, before anyone has called Toolkit.getDefaultToolkit()
(e.g., before any peers have been created), a NullPointerException
results.
java version "1.1.7B"
% java ToolkitTest
java.lang.NullPointerException
at java.awt.Toolkit.getEventQueue(Toolkit.java:662)
at java.awt.Component.hide(Component.java:536)
at ToolkitTest.main(ToolkitTest.java:17)
The following code reproduces the problem:
*/
import java.awt.*;
import java.awt.event.*;
public class ToolkitTest extends ComponentAdapter
{
static public void main(String[] args)
{
Button b = new Button("Blah");
b.addComponentListener(new ToolkitTest());
b.hide();
}
}
====================================================================