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.

  1. Drop a JTabbedPane component from palette onto a form in the GUI designer window.
  2. Drop a JPanel component onto the JTabbedPane. A tab will appear.
  3. 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).
  4. In Properties window scroll down to the Layout category.
  5. The Tab Icon, Tab Title, and Tab Tooltip properties will be exposed, and can be modified.

  Applies to: All NetBeans versions
  Platforms: All
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo