Can anyone give me some tips about how to fix or
where to look at to fix this exception?
java.lang.NullPointerException
at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:59)
at sun.awt.motif.MToolkit.createFrame(MToolkit.java:153)
at java.awt.Frame.addNotify(Frame.java)
at java.awt.Window.show(Window.java)
at java.awt.Component.show(Component.java)
at java.awt.Component.setVisible(Component.java)
at GUI.<init>(GUI.java:20)
at WhiteB.<init>(WhiteB.java:53)
at WhiteB.main(WhiteB.java:63)
The line that causes this exception is:
class GUI {
....
public GUI(WhiteB wb, DrawCanvas canvas, THPanel tp)
{
...
setupMenuBar(wb);
setupComponents(wb);
wb.setVisible(true); <========== here
}
and the class WhiteB extends Frame.
I have written this applet on sparc10 and it worked pretty well.
This exception happened when I did telnet to the sparc10 from
sgi o2, and ran from there.
What might cause this exception?
Thanks in advance.
--
-----
Sukmoon Chang
suk...@paul.rutgers.edu
Hi :
Actually, this problem is in the JDK1.1 bug list. The following
is from the documentation "JDK1.1_Final: Important Known Bugs in
the java.awt package",
You may get a NullPointerException if the default font listed in
the $JAVA_HOME/lib/font.properties file is not available on Unix
environments. In order to workaround this, change the default font in
this file to a font which does exist on your system.
If you don't need to run in a multifont (internationalized)
environment, you can simply remove this file.
***********************************************
Ting Chen
Computer Science Department
Brigham Young University
e-mail : ch...@cs.byu.edu
http://escalante.cs.byu.edu/~chent/chent.shtml
***********************************************
In article <5gt63s$m...@john.rutgers.edu>,
suk...@john.rutgers.edu (Sukmoon Chang) writes:
|>I have written this applet on sparc10 and it worked pretty well.
|>This exception happened when I did telnet to the sparc10 from
|>sgi o2, and ran from there.
|>What might cause this exception?
|>Thanks in advance.
The message suggested that there was no Frame peer, and you say you
telnetted in, therefore I suggest that you need to setenv DISPLAY
to yourmachine.yourdomain:0 and try again...
--
/** Java G <hamm...@meng.ucl.ac.uk>
* Virtual Reality ROV Docking Planner
* http://www.ucl.ac.uk/~zcemm23
* You broke the light, and now... it's dark. */