I am developing a simple image editor and need the user to be able to change the iconImage displayed in a JLabel. If I use setIcon to change the image, am I adding layer upon layer of iconImages on the JLabel (thus unnecessarily consuming memory) or does setIcon remove the previous icon (icon1) and add the new one (icon2)?
If I have to manage the removal process myself, how do I do so?