JTabbedPane
A JTabbedPane manages multiple components (usually JPanels with their own layouts and sub-components) within its pane. The IDE automatically gives each component its own labeled tab. When the user clicks on the tab, its component is selected and comes to the front of other components.
JTabbed Pane in the Form Editor
![]()
The above figure shows a Form Editor window over the Component Inspector window. A JPanel has been added to the JFrame, a JTabbedPane has been added to the JPanel, and three components have been added to the JTabbedPane.
By default, each tab is named for its own component. Each component in the JTabbedPane has its own layout settings, where the tab parameters (
Tab Icon
,Tab Name
,Tab ToolTip
) are set.Note: Be careful where you click when adding new components to a JTabbedPane. If you click on an existing tabbed component, your new component might be added to the existing component rather than to its own new tab.
Contents | Prev | Next | Index |