Google 그룹스는 더 이상 새로운 유즈넷 게시물 또는 구독을 지원하지 않습니다. 과거의 콘텐츠는 계속 볼 수 있습니다.

Problems with setContentType() Bug or feature?

조회수 0회
읽지 않은 첫 메시지로 건너뛰기

mi...@my-dejanews.com

읽지 않음,
1998. 12. 11. 오전 3:00:0098. 12. 11.
받는사람
Help!

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

mi...@my-dejanews.com

읽지 않음,
1998. 12. 11. 오전 3:00:0098. 12. 11.
받는사람
//Here is a simple Applet that causes the problem with JRE 1.2:
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;

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>,

새 메시지 0개