File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
I/O and Streams
Image Icon Update Problem??
Lee Siong Tai
Joined: Dec 20, 2009
Dec 20, 2009 20:39:39
We encounter problem when using
, anyone can help?
In JFrame1, we use
to show an
(says, C:\abc.jpg with an apple) on
It shows Apple on the Jbutton.
We then update abc.jpg. (says, copy C:\def.jpg with an orange to C:\abc.jpg)
So, we check in Windows, both abc.jpg and def.jpg are orange now.
But when we load again JFrame1, the image on
is still show apple.
We expect it is an orange.
So, we close the apps and start again.
Now, it shows orange.
We use ImageIO.read to read the image to
and use it in construct
It seems that
cache the image and does not reload it.
How can we clear the cache and force
to load the latest image?
I agree. Here's the link:
subject: Image Icon Update Problem??
writing contents to a text area or hidden field
Mouse shift event coding - to trigger a predetermined sequence of images to a GUI
How to display an Image with the Text in a JButton ??
JToolBar icons not seen
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015