Java/Swing offscreen rendering (Cobra HTMLPanel -> BufferedImage) Problem: Component doesn't finish
- by Alterscape
I'm trying to render the contents of a the Java/Swing Cobra HTML renderer to an offscreen BufferedImage, for use elsewhere in my app:
slideViewPanel.setDocument(document, rendererContext);
BufferedImage test = new BufferedImage(300,300,BufferedImage.TYPE_INT_RGB);
Graphics g = test.getGraphics();
slideViewPanel.paint(g);
The resulting image…