JFrame refresh.

I got a JPanel on my JFrame, and I want to remove it to add another one. I use the remove method, then the add method. The problem is, the JFrame doesn't refresh. I have to reduce the frame to make the new JPanel show up. I tried setVisible(true) and repaint(), but none works.

Any help?

[301 byte] By [Poutinea] at [2007-10-3 8:32:39]
# 1
revalidate() on the JFrame
mpmarronea at 2007-7-15 3:39:57 > top of Java-index,Desktop,Core GUI APIs...
# 2
revalidate doesn't work for JFrame, but validate works, thanks!
Poutinea at 2007-7-15 3:39:57 > top of Java-index,Desktop,Core GUI APIs...