Results 1 to 2 of 2
Thread: Image in jLabel
- 11-23-2012, 02:31 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 1
- Rep Power
- 0
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, 05: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.
db
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.
Similar Threads
-
how to resize image to fit it into a jlabel
By shruts in forum AWT / SwingReplies: 2Last Post: 07-07-2012, 08:50 AM -
Displaying image in jLabel
By victaino in forum New To JavaReplies: 10Last Post: 05-17-2012, 06:12 AM -
Using Image in JLabel? Please Help! :-)
By Alerhau in forum New To JavaReplies: 9Last Post: 09-07-2011, 07:48 PM -
Image On a JLabel
By corbokhan in forum New To JavaReplies: 11Last Post: 11-06-2010, 01:18 AM -
Image in JLabel
By ishere11 in forum AWT / SwingReplies: 2Last Post: 04-29-2010, 09:02 AM
Bookmarks