JPanel/JFrame refresh

I am writing an application which removes a JPanel and replaces it when you perform certain actions, this usually works but when I add a new row (3 buttons, 3 textfield) to the JPanel you need to minimize and maximize the window to get it to refresh properly.

Does anyone know what methods I need to call in order to force this refresh without the user having to minimize the window? It would be the same method(s) implicitly called when a jframe is minimized/maximised. Thanks.

[491 byte] By [jjdevinea] at [2007-11-27 10:49:41]
# 1

call revalidate() on the panel's parent is one way.

bsampieria at 2007-7-29 11:20:48 > top of Java-index,Desktop,Core GUI APIs...
# 2

there is no revalidate() on the Container object but i tried the validate() method which seems to work - thanks.

jjdevinea at 2007-7-29 11:20:48 > top of Java-index,Desktop,Core GUI APIs...