M
Michael Jung
I have the following problems, someone may already have experienced or knows
how to solve.
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 Graphics
context that is not the GUI (where everything works fine).
The problem is that immediately after I load the document, the images seem not
to be available for drawing. This fits with the fact that the GUI elements on
screen get redrawn as images get loaded successively. However, I cannot find
a proper event to listen to, that tells me that the JEditorPane is finished
drawing. I also can't find anything at the HTMLDocument, but I presume that
would be the wrong object anyway.
Additionally there may be a problem that simple drawing of the JEditorPane
without actually "showing" it, might not convince that component to draw the
images at all. I have experimented a little with the
SwingUtilities.paintComponent to circumvent this but it apparently didn't
help.
Thanks,
Michael
how to solve.
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 Graphics
context that is not the GUI (where everything works fine).
The problem is that immediately after I load the document, the images seem not
to be available for drawing. This fits with the fact that the GUI elements on
screen get redrawn as images get loaded successively. However, I cannot find
a proper event to listen to, that tells me that the JEditorPane is finished
drawing. I also can't find anything at the HTMLDocument, but I presume that
would be the wrong object anyway.
Additionally there may be a problem that simple drawing of the JEditorPane
without actually "showing" it, might not convince that component to draw the
images at all. I have experimented a little with the
SwingUtilities.paintComponent to circumvent this but it apparently didn't
help.
Thanks,
Michael