Java Layout汇总

Java中所有的Layout都位于java.awt包下,整理如下,:

接口
LayoutManager
Defines the interface for classes that know how to lay out Containers.
api


BorderLayout
A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
api

CardLayout
A CardLayout object is a layout manager for a container.
api

FlowLayout
A flow layout arranges components in a directional flow, much like lines of text in a paragraph.
api

GridBagLayout
The GridBagLayout class is a flexible layout manager that aligns components vertically, horizontally or along their baseline without requiring that the components be of the same size.
api

GridLayout
The GridLayout class is a layout manager that lays out a container’s components in a rectangular grid.
api