Note that in your code above, you add the panel to the frame and then you add the label to the frame. This makes the label overwrite the panel, so the panel isn't doing anything. You should add the label to the panel first, and then add the panel to the frame. Also, you should make the frame visible at the very end of the method, after everything has been added.