Using Layouts

An object that implements the LayoutManager interface determines the method by which the components of a Container object are organized. The layout of a Container is specified using the setLayout() method of the Container class. This method passes a reference to an object that implements the LayoutManager interface. The layout should be set before components are added to the Container.

The LayoutManager interface provides a set of methods that are implemented by classes that control the layout of a container. These methods include those that add or remove components from a layout, calculate the size of the container, and lay out the components of the container. The LayoutManager2 interface extends the LayoutManager interface to ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.