Image in jLabel
I have used jLabel to display a image. In jFrame3 I gave a option to change image using jFileChooser for a particular user.After I change the image of particular user using the form jFrame3, I try to view the details of the details where i could find only my old photo for the particular user. I have checked the directory where the images are stored . In the directory the image is updated to new one. May I know what is the problem?
(Note: I store all details of a user in database(MS Access) and image are stored in a directory "img" . To change the photo I delete the old one and save the new one with the same file name as before)
Re: Image in jLabel
If you're loading the image (directly or indirectly) via java.awt.Toolkit, be aware that Toolkit caches image data. Calling flush() on the image is then the only way to force a reload from disk.
If that's not it, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem and we'll take a look.
Note: Keep it short and relevant. We don't want to see all your code, and we don't want to wade through IDE/visual designer-generated gobbledygook.