I call setContentType("text/html") from a JEditorPane-object in an applet's
start method.
when the applet is loaded - no problem. but when I reload the applet I get
following exception:
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Compiled Code)
at
javax.swing.JEditorPane.createEditorKitForContentType(JEditorPane.java:849)
at EditorApplet.init(Compiled Code)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
Any suggestions to solve to problem??
I'm using Netscape 3 with Java Plug-In 1.2.
Seems to be a new bug in the new Java 2 ?!!!
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
public class ReloadException extends JApplet {
public void start() {
getContentPane().setLayout(new BorderLayout());
JEditorPane e = new JEditorPane("text/html",
"<html><body><b>some text</b></body></html>");
JScrollPane p = new JScrollPane(e);
getContentPane().add(p, BorderLayout.CENTER);
}
}
/* And here is the exception that is thrown when the applet is reloaded:
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Compiled Code)
at
javax.swing.JEditorPane.createEditorKitForContentType(JEditorPane.java:849)
at
javax.swing.JEditorPane.getEditorKitForContentType(JEditorPane.java:741)
at javax.swing.JEditorPane.setContentType(JEditorPane.java:645)
at javax.swing.JEditorPane.<init>(JEditorPane.java:198)
at ReloadException.start(ReloadException.java:10)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
*/
In article <74r3ph$eob$1...@nnrp1.dejanews.com>,