Can't refresh a JPanel/text
I'm new to java GUI stuff, and am trying to add a component that can be blank until I click a button, at which point I want it to display some text. The problem is that I have made the jPanel, with no text, but when I try to add the text with panel.setText("text"), it doesn't change on the display. I have tried to repaint etc, but nothing works. I am using a group layout, and as such, the JPanel is created when the layout is setup.
Thanks for any help,