I'm using Graphics2D.drawImage to draw an image into a BufferedImage. Then I Use ImageIO.write() to output this to a PNG. Often I don't see certain images that I painted this way.
I assume this is because drawImage is an asynchronous operation and I need to wait for it to complete. I've tried implementing an ImageObserver but without success.
Can anybody show me how it's done ?