-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.1.8
-
sparc
-
solaris_2.5
Name: saC57035 Date: 07/06/99
This bug is reproducible in 1.1.X JDK releases only, and it is filed
for tracking purposes. Feel free to close this report out as integrated
in JDK 1.2fcs.
package - visible method Toolkit.getEventQueue() throws
NulPointerException if Toolkit.getDefaultToolkit() was not
called previously.
--------------- Test.java
import java.awt.*;
import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
class Dlg extends Panel implements WindowListener {
Dialog d;
public Dlg(int width, int height) {
d = new Dialog(new Frame());
d.setSize(200, 200);
d.addWindowListener(this);
}
public synchronized void windowOpened(WindowEvent e) {}
public synchronized void windowClosed(WindowEvent e) {}
public synchronized void windowClosing(WindowEvent e) {}
public synchronized void windowIconified(WindowEvent e) {}
public synchronized void windowDeiconified(WindowEvent e) {}
public synchronized void windowActivated(WindowEvent e) {}
public synchronized void windowDeactivated(WindowEvent e) {}
public void Dispose() {
d.dispose();
}
}
public class Test {
public static void main(String [] argv) throws Exception {
Dlg D = new Dlg(200, 200);
D.Dispose();
}
}
--------------- Output
java.lang.NullPointerException
at java.awt.Toolkit.getEventQueue()
at java.awt.Window.postWindowEvent()
at java.awt.Window.dispose()
at Dlg.Dispose()
at Test.main()
---------------
======================================================================