Chapter 12, “The java.awt Package: Layout”

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. It passes an object that implements the LayoutManager interface as a parameter.

The BorderLayout class lays out components along the north, south, east, and west borders of the container and in the center of the container.

The CardLayout class is used to lay out the components of a Container object in the form of a deck of cards in which only one card is visible at a time.

The FlowLayout class is used to lay out the components of a Container object in a left-to-right, top-to-bottom ...

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.