Table of Contents Markup Tutorial Interfacing with Java™ Web Services

Unlike Flow Layout, where the placement of individual components cannot be constrained, Border Layout specializes in laying out components according to one of five predefined spatial constraints that identify loosely-defined areas in the container according to standard cartographic conventions — North for top, South for bottom, East for right, West for left, and Center for whatever is left. Note that the first letter of each constraint is in upper case.

Constraints

Use of constraints is optional. If constraints are missing or misspelled, Center is assumed. If some of these constraints are not used by any component inside the container, the corresponding areas are subsumed by the area identified by Center. If multiple components are subject to the same constraints, the last one to use a specific constraint value prevails.

Adding Sub-Components

When using Flow Layout, components must be added to a container in the order they appear inside the container, but with Border Layout, components may be added to the container in any order. In either case, the element representing the layout manager must be inserted before all sub-components. See the Resource Reference for rules governing the structure of resources.

To see why this particular layout manager is called Border Layout, run the following example, and resize the frame that is shown as a result.

Make this object in eNode Sandbox. The result should be similar to the following:


Copyright © 2002 eNode, Inc. All Rights Reserved.