First of all, make sure you invoke revalidate() each time you add or remove component from your frame.
The problem you are having could probably be easily resolved by putting an empty label somewhere on your frame, and when user clicks button, just set image to already existing label. For checking, first add just some text to your label.
Also, I would avoid setting layout to null.
The quieter you are, the more you are able to hear.