As the TabbedPaneDemo example shows, a tab can have a tool tip and a mnemonic, and it can display both text and an image.
Tab Placement
The default tab placement is set to the TOP location, as shown above. You can change the tab placement to LEFT, RIGHT, TOP or BOTTOM by using the setTabPlacement method.
Code for Tabbed Panes
The following code from TabbedPaneDemo.java creates the tabbed pane in the previous example. Note that no event-handling code is necessary. The JTabbedPane object takes care of mouse and keyboard events for you.