|| | |||Browse by category|
How can I deep copy an IlvIcon so that the image inside it is also copied?
An instance of IlvIcon can contain an instance of java.awt.Image or of java.awt.image.RenderedImage, and a copy of an IlvIcon object references the same image as the original.
To make a deep copy of an IlvIcon object:
- Copy this object and get the reference to its image (by means of the method getImage() or IlvIcon.getRenderedImage()).
- Copy that image into a new image object and set it to the new IlvIcon object using one of the methods IlvIcon.setImage() or IlvIcon.setRenderedImage().