Obtaining the filename of a java ImageIcon?

Caporegime
Joined
12 Mar 2004
Posts
29,962
Location
England
I have a swing application where I need to change the picture displayed on a jlabel if it is displaying a specified image, but I can't find a way to obtain the filename of the icon currently displayed, is there a method for this?
 
Code:
[B][I]jLabelName[/I][/B].getIcon().toString()

Any help?

The alternative is to track which image the label is currently displaying in a separate field and update it as necessary.
 
Back
Top Bottom