-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.1.7
-
None
-
sparc
-
solaris_2.6
the AWT falls over when applications set Frame.setIconImage().
adding the following code to an AWT application causes the error.
rpnframe is the frame created by the application for its GUI.
{
Image icon_img;
java.net.URL url;
// really, any application level class will do here
url = (new myMouseListener()).getClass().getResource("caveh.gif");
if (url != null) {
icon_img = Toolkit.getDefaultToolkit().getImage(url);
if (icon_img != null)
rpnframe.setIconImage(icon_img);
}
}
=================
3.zeta$ j rpncalc
java.lang.NullPointerException
at sun.awt.motif.MFramePeer.setIconImage(MFramePeer.java:113)
at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:87)
at sun.awt.motif.MToolkit.createFrame(MToolkit.java:117)
at java.awt.Frame.addNotify(Frame.java:203)
at java.awt.Window.show(Window.java:145)
at java.awt.Component.show(Component.java:501)
at java.awt.Component.setVisible(Component.java:463)
at rpncalc.main(rpncalc.java:43)
3.zeta$ j -version
java version "1.1.7"
3.zeta$
- duplicates
-
JDK-4163400 java.lang.NullPointerException at sun.awt.motif.MFramePeer.setIconImage(MFramePe
- Resolved