JFrame.getContentPane().invalidate(); JFrame.getContentPane().validate(); JFrame.getContentPane().repaint();

Read more of this post