Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Toolkit's getImage() is caching the image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Toolkit's getImage() is caching the image



I have a bug that seems to be due to Toolkit's getImage() method caching the image. I have the following line of code:

image = Toolkit.getDefaultToolkit().getImage(new URL(url));

If my program later changes the image file stored at the URL, the next time this is called it returns the original image, not the new one. I don't know if this happens on other platforms as well. Unfortunately since the getImage() method is handled by native code, I can't check to see if the code really does caching.

Thoughts?

--
Bill Tschumy
Otherwise -- Austin, TX
email@hidden
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.