How do I set tab names in a JTabbedPane?
Select the component representing the tab (typically a JPanel) and go to its Layout properties in the property sheet (under Properties tab). You can set tab title here, as well as tooltip and icon. For example, step through the following procedure.
- Drop a JTabbedPane component from palette onto a form in the GUI designer window.
- Drop a JPanel component onto the JTabbedPane. A tab will appear.
- Make sure the JPanel is selected (you can use the Inspector; don't click on the tab in the designer — it selects the tabbed pane).
- In Properties window scroll down to the Layout category.
- The Tab Icon, Tab Title, and Tab Tooltip properties will be exposed, and can be modified.
Applies to: All NetBeans versions