For removing (and then, for example, add new JComponents) JComponents from JPanel or from top-level containers you have to call, only once and on the end of the action:
revalidate();
repaint();
And if you only resize or change JComponents:
validate();
repaint();