This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I'm unable to replicate what you describe. The only thing I can offer is a suggestion to look at the method detail in the Toolkit api for the methods 'getImage' and 'createImage'. This seems to work okay:
Joined: Sep 07, 2005
Thanks for that.
The code you supplied was for a java application. I am having a problem when it is an Applet.
when I developed the applet it worked perfectly in the IDE which wraps the applet in an application to test it
But when the applet was loaded in a browser thats when the problem occured both in IE and Firefox using JRE 1.5
I didn't use the toolkit getImage() instead I used the Applet getImage().
I don't know if that has something to do with it
I will create an applet using your code and see if I can get it to fail.
When I added in the line...
i1 = null;
The problem was solved so I assume that perhaps as an efficiency applet.getImage() reuses the image already referenced by i1.
I cannot think of another cause for the symptoms I noted.