posted 22 years ago
uhm, sorry. just read some more API. so the mime type is set by some methods automatically. that is, setPage will select "text/html".
" 3. The setPage method can be used to initialize the component from a URL. In this case, the content type will be determined from the URL, and the registered EditorKit for that content type will be set. "
Nevertheless, I would set the mime type explicitely, just to be sure.
The second point is: The JTextPane has to be editable(false). (Sorry, if I am telling you things you are already aware of!)
" Some kinds of content may provide hyperlink support by generating hyperlink events. The HTML EditorKit will generate hyperlink events if the JEditorPane is not editable (JEditorPane.setEditable(false); has been called)."
cheers