Problem: Refreshing a JPanel only works when I resize the window
Hello,
Here is my problem when I click on my a button I want the component in my Jpanel (JLabel and JtextField) to disappear and add some other one.
I do that by using :
1) the methodremoveAll() on my JPanel
2) add my new JLabel and JtextField to my JPanel
3) usingrepaint() andrevalidate()
Actually it works the first time, but then I have to resize my GUI window, even a litte for my new components to appear.
I think the problem comes from removeAll() method. So if anyone has an idea how I can refresh a JPanel (removing old components and adding new ones) without resizing the window it would be nice.
Thank you.

