E
Emmanuel Freund
I have a strange error:
With this function:
public static ImageIcon loadImageIcon(String file, String iconName) {
return new ImageIcon(file+ '/' + iconName);
}
I first rename Image1.jpg to someImage.jpg and call this function with
loadImageIcon(myFile,someImage.jpg).
So Image1.jpg is loaded and paint (with some other functions of course).
Then during my execution, I rename Image2.jpg to someImage.jpg and call
loadImageIcon(myFile,someImage.jpg).
Then the Image loaded is still Image1.jpg.
Is that possible that Java remember that's the same function called with the
same variables, and so don't reload the Image and instead take the Image
from a buffer somewhere?
And if it's the case, how can we clear the buffer so the Image2.jpg is
reloaded?
Thanks,
With this function:
public static ImageIcon loadImageIcon(String file, String iconName) {
return new ImageIcon(file+ '/' + iconName);
}
I first rename Image1.jpg to someImage.jpg and call this function with
loadImageIcon(myFile,someImage.jpg).
So Image1.jpg is loaded and paint (with some other functions of course).
Then during my execution, I rename Image2.jpg to someImage.jpg and call
loadImageIcon(myFile,someImage.jpg).
Then the Image loaded is still Image1.jpg.
Is that possible that Java remember that's the same function called with the
same variables, and so don't reload the Image and instead take the Image
from a buffer somewhere?
And if it's the case, how can we clear the buffer so the Image2.jpg is
reloaded?
Thanks,