Results 1 to 2 of 2
Thread: Image in jLabel
- 11-23-2012, 01:31 PM #1Member
- Join Date
- Nov 2012
- Rep Power
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)
- 11-23-2012, 04:09 PM #2
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.If you're forever cleaning cobwebs, it's time to get rid of the spiders.
- By shruts in forum AWT / SwingReplies: 2Last Post: 07-07-2012, 07:50 AM
- By victaino in forum New To JavaReplies: 10Last Post: 05-17-2012, 05:12 AM
- By Alerhau in forum New To JavaReplies: 9Last Post: 09-07-2011, 06:48 PM
- By corbokhan in forum New To JavaReplies: 11Last Post: 11-06-2010, 12:18 AM
- By ishere11 in forum AWT / SwingReplies: 2Last Post: 04-29-2010, 08:02 AM