Try this:
Click the Launch button to run TabComponentsDemo using Java™ Web Start (download JDK 7 or later). Alternatively, to compile and run the example yourself, consult the example index.Launches the TabComponentsDemo Application
Put the cursor over a tab.
Select a tab by clicking it (make sure not to hit the little cross).
Put the cursor over one of the widgets with a little cross.
The cross turns magenta and gets enclosed in a square. A tool tip associated with the close button appears.
Click the cross with the left mouse button to close the tab.
Restore the tabs that have been removed by choosing the Reset JTabbedPane item from the Options menu.
Note that tabs with custom components are displayed on top of original tabbed pane tabs.
To view the tabs underneath, open the Options menu and clear the Use TabComponents checkbox.
Display the tabs with components by selecting the Use TabComponents checkbox again.
Close all tabs. Now the tabbed pane is empty.