Java Reference
In-Depth Information
frame.add(tabbedPane, BorderLayout.CENTER);
frame.setSize(400, 150);
frame.setVisible(true);
}
};
EventQueue.invokeLater(runner);
}
}
Customizing a JTabbedPane Look and Feel
Each installable Swing look and feel provides a different JTabbedPane appearance and set of
default UIResource values for the JTabbedPane component. Figure 11-13 shows the appearance
of the JTabbedPane container for the preinstalled set of look and feel types: Motif, Windows, and
Ocean. Several items are specific to the look and feel: how the JTabbedPane appears when the
set of available tabs is too wide for the display, how it responds when a user selects a tab in a
back row, how it displays the tooltip, and how it displays the scroll tab layout.
Figure 11-13. JTabbedPane under the different look and feel types
Search WWH ::




Custom Search