|
|
|
|||
|
Laying Out Components Within a ContainerThis lesson tells you how to use layout managers that the Java platform provides. It also tells you how to use absolute positioning (no layout manager) and gives an example of writing a custom layout manager. For each layout manager (or lack thereof), this section has an example that can run either as an applet or as an application. By resizing the window the example brings up, you can see how size changes affect the layout.
Before reading this section,
you should understand basic layout management concepts,
which you can find in
Layout Management
Using Layout ManagersThis section gives both general rules and detailed instructions on using each of the layout managers that the Java platform provides. Creating a Custom Layout ManagerInstead of using one of the Java platform's layout managers, you can write your own. Layout managers must implement the Doing Without a Layout Manager (Absolute Positioning)If necessary, you can position components without using a layout manager. Generally, this solution is used to specify absolute sizes and positions for components. Solving Common Layout ProblemsSome of the most common layout problems are that components are displayed too small -- or not at all. This section tells you how to fix these and other common layout problems. | |||
|