The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: Creating a GUI with JFC/Swing
Lesson: Laying Out Components Within a Container

## Laying Out Components Within a Container: Examples (1.1/1.2)

> The table that follows lists every 1.1/1.2 example in the Laying Out Components Within a Container lesson, with links to required files and to where each example is discussed.

> > Note: These examples use the Swing 1.1 API, which is supported by J2SE 1.2 and compatible releases, as well as JDK 1.1 + JFC/Swing 1.1. To see more up-to-date versions of these examples that can be launched using JavaTM Web Start, see the list of 1.4 examples.
> > Examples can run either as an application or as an applet unless noted otherwise. See Getting Started with Swing for details about releases and instructions on compiling and running programs.

> You can get the source, image, and other files required for all these examples by downloading the Tutorial Examples bundle, which contains the files in the correct hierarchy. If you download an individual example, take care to have all the necessary files in the proper hierarchy when you compile and run it. For example, many examples expect their image files to be in a directory named `images` that's in the same directory as the example's class files.

Source Files | Image & Other Files | Where Described
`AlignmentDemo.java` (application only) | `geek-cght.gif` `middle.gif` | How to Use BoxLayout
`BorderWindow.java` `AppletButton.java` |  | How to Use BorderLayout
`BoxLayoutDemo.java` (application only) `BLDComponent.java` |  | How to Use BoxLayout
`BoxWindow.java` `AppletButton.java` |  | How to Use BoxLayout
`CardWindow.java` `AppletButton.java` |  | How to Use CardLayout
`CustomWindow.java` `DiagonalLayout.java` `AppletButton.java` |  | How to Use CustomLayout
`FlowWindow.java` `AppletButton.java` |  | How to Use FlowLayout
`GridBagWindow.java` `AppletButton.java` |  | How to Use GridBagLayout
`GridWindow.java` `AppletButton.java` |  | How to Use GridLayout
`NoneWindow.java` `AppletButton.java` |  | Doing Without a Layout Manager (Absolute Positioning)
`TabWindow.java` `AppletButton.java` |  | How to Use CardLayout

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.