Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to update image in JLabel  RSS feed

 
blackcarlos Dibia
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pls I have an application that writes an image to disk
the problem is that I'm using IconImage to display this image in a label
and when the app overwrites the previous image the label does not reflect
the change
is there a way to solve this or do I have to use another technique to
display the image
all I want to do is display the current image written to disk
help pls
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after writing the image to disk, it would be just
label.setIcon(new ImageIcon(fileName));
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!