Displaying an image only when getImage() is done
How can I tell getImage() to return only when the picture's been completely loaded?
My application has a splash screen showing a background picture. Everything is fine, except for the fact that the Toolkit's getImage() method returns before having read the picture (62K inside the jar) in its entirety; this means the splash window comes up with its beans on a gray (or partly painted) background for a few seconds (ugly), until the picture finishes loading up. I'd like to avoid that. Anybody know how to fix that?
Eric
P.S. Here's the code I use to load the image:
URL u = ClassLoader.getSystemResource("images/Splash.jpg");
background = Toolkit.getDefaultToolkit().getImage(u);

