Using the JFC/Swing Packages |
This page will cover the use ofJPanel
. For now, we provide a list of examples that use panels with different layout managers and one that subclassesJPanel
:
Example Where Described Notes ButtonDemo.java
How to Use Buttons. A subclass of JPanel
. UsesFlowLayout
, the default layout manager of a panel.ToolBarDemo.java
How to Use Toolbar. Shows a panel with three components laid out by BorderLayout
.BorderDemo.java
How to Use Borders. Contains several panels that use GridBagLayout
.BoxLayoutDemo.java
How to Use BoxLayout. Illustrates the use of a panel with Swing's BoxLayout
manager.LabelDemo.java
How to Use Labels. Uses a panel whose three components are laid out in a grid by GridLayout
.TabbedPaneDemo.java
How to Use Tabbed panes. A subclass of JPanel
that creates its GUI in its constructor and uses aGridLayout
.The JPanel API
[PENDING: Put tables here]
Using the JFC/Swing Packages |