Originally posted by Gil Estes:
If your image comes from a gif file, then you can't change it dynamically unless you load a different gif. What I think you may be getting at is changing the appearance of an image based on a given condition or state. If this is the case, then make the gif image have a transparent background. Place the gif into an image and change the image background to what is needed. For instance, have an image of a computer with a green background for available, yellow for in use and red for not operating. All you have to do is call image.setBackground(Color.xxx).
you guessed right!but i didn't get clear picture
what kind of image object i need to place on the component at the first place.because i am not seeing any methods like setbackground() on Images.
do u mean..
JLabel label =new JLabel();
label.setICon("myICon.gif");
label.setOpaque(true);
label.setBackground(myColorObj);
thanks for u r reply..