How to Use Tabbed Panes
With the JTabbedPane class, you can have several components, such as panels, share the same space. The user chooses which component to view by selecting the tab corresponding to the desired component. If you want similar functionality without the tab interface, you can use a card layout instead of a tabbed pane.
To Create Tabbed Panes
To create a tabbed pane, instantiate JTabbedPane, create the components you wish it to display, and then add the components to the tabbed pane using the addTab method.
The following picture introduces an application called TabbedPaneDemo that has a tabbed pane with four tabs