August 2004
Intermediate to advanced
480 pages
9h 41m
English
This component provides a way to access an arbitrary set of panels. It capitalizes on CardLayout shown earlier, and offers small tabs atop your JPanels to offer the user an easy way to switch around. This is used frequently in office productivity applications to let the user specify preferences and so forth. It is handy and surprisingly easy to use.
package net.javagarage.demo.ui; /**<p> * Shows a JTabbedPane, which allows you to * choose between pages with a tab, like * paper manila folders. * * </p> * @author Eben Hewitt **/ import javax.swing.JTabbedPane; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JFrame; import javax.swing.JComponent; import java.awt.BorderLayout; ...
Read now
Unlock full access