Java Reference
In-Depth Information
// We need a main program to instantiate and show.
public
public static
static void
void main ( String [] args ) {
new
new JFrameFlowLayout (). setVisible ( true
true );
}
}
See Also
I have not discussed the details of the advanced layouts. For an example of a dialog layout
using nested panels, see the Font Chooser in Program: Custom Font Chooser . For an ex-
ample of a GridBagLayout , see the file graphics/GfxDemo2.java in my javasrc collection.
For more details, see the Layout Tutorial .
A Tabbed View of Life
Problem
These layouts don't include a tab layout, and you need one.
Solution
Use a JTabbedPane .
Discussion
The JTabbedPane class acts as a combined container and layout manager. It implements a
conventional tab layout, which looks like Figure 14-2 .
Search WWH ::




Custom Search