> > I have a JEditorPane that contains an HTMLDocument, which contains some
> > referenced images, i.e. <img>-tags. Now, I'd like to display this in
[quoted text clipped - 12 lines]
> > SwingUtilities.paintComponent to circumvent this but it apparently didn't
> > help.
> public class HTMLEditorKit2 extends HTMLEditorKit{
> public Document createDefaultDocument(){
[quoted text clipped - 8 lines]
> JEditorPane jep = new JEditorPane();
> jep.setEditorKitForContentType("text/html", new HTMLEditorKit2());
Doesn't help. It speeds up the drawing, but it's not fast enough (apparently).
I'm not sure this should really do the trick, because the GUI loading also
still shows some lag.
That also makes sense, since displaying an HTML document depends on the
size/layout of the JEditorPane itself, which can vary during time, while the
loading of the document happens only once.
[Technically, I'm not using any difficult layout in the document, but the
possibility should show that the HTML layout is a seperate process from the
document loading, which is now synchronous.]
I hope there is something about the JEditorPane that tells me when the doc is
fully layed out, since the GUI Layout manager somehow knows (I hope).
Michael
Roedy Green - 29 Jun 2007 14:45 GMT
>I hope there is something about the JEditorPane that tells me when the doc is
>fully layed out, since the GUI Layout manager somehow knows (I hope).
The HTML rendering inside Java is pretty Mickey Mouse. Perhaps you
needa more powerful rendering engine. see
http://mindprod.com/jgloss/htmlrendering.html
If you have a masochistic streak, you might consider rendering the
images yourself on a separate layer and somehow jostling them around
to render over top of the mangled images produced by Java.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Michael Jung - 30 Jun 2007 16:06 GMT
[...]
> >I hope there is something about the JEditorPane that tells me when the doc is
> >fully layed out, since the GUI Layout manager somehow knows (I hope).
> The HTML rendering inside Java is pretty Mickey Mouse. Perhaps you
> needa more powerful rendering engine. see
> http://mindprod.com/jgloss/htmlrendering.html
I don't see the point. It's not the rendering I have problems with. It's that
I don't know when it's finished.
Michael