How do I give an Icon an URL at runtime. I know that with
I can give the icon an URL when I create it. But at the beginning of the program it does not know which image it should use. I want to create an empty icon and give it an URL later when the program has determined which Image to use. I tried setImage() and that did not work, because I have to give it a string as parameter(the URL of the image to use).
posted 10 years ago
Cant you use a fully transparent .gif image as the first image? You could even store that as a byte array in an interface that way you will allways have that picture.
I never used ImageIcon so this is a shot into the blue...