I was removing a panel from JFrame and adding a JProgressBar at that place (BorderLayout.SOUTH)I am getting the following Exception while removing it
I am using this code to remove and add components

SwingUtilities.invokeLater(new Runnable(){ public void run() { jpb.setString("Completed : 0 %"); // reference to progressbar jpb.setValue(0); lowerBorder.remove(status); remove(lowerBorder); lowerBorder.add(jpb); repaint(); revalidate(); }});Please tell me where the problem is

Check Solution