Check this example.
When you remove the JTabbedPane, then you must update the GUI.
jTabbedPane.removeAll();
jTabbedPane.updateUI();
I don�t know if the method updateUI() is part of JTabbedPane, but if it is not, then you could use JPanel. with JPanel you can remove and update your panel.