The FlowLayout LayoutManager provides the means to lay out components in a row by row fashion. As each row fills up, the components continue on the next row.
public class java.awt.FlowLayout extends java.lang.Object implements java.awt.LayoutManager, java.io.Serializable { // Constants public static final int CENTER; public static final int LEFT; public static final int RIGHT; // Constructors public FlowLayout(); public FlowLayout (int alignment); public FlowLayout (int alignment, int hgap, int vgap); // Instance Methods public void addLayoutComponent (String name, Component component); public int getAlignment(); public int getHgap(); public int getVgap(); public void layoutContainer (Container target); public Dimension minimumLayoutSize (Container target); public Dimension preferredLayoutSize (Container target); public void removeLayoutComponent (Component component); public void setAlignment (int align); public void setHgap (int hgap); public void setVgap (int vgap); public String toString(); }
The default alignment for a FlowLayout object; rows of components are centered within the container.
An alignment for a FlowLayout object; rows of components start on the left side of the container.
An alignment for a FlowLayout object; rows of components start on the right side of the container.
Constructs a FlowLayout object with CENTER alignment.
Alignment of components within the container.
Constructs a FlowLayout object with the given alignment.
Alignment of components within container
Horizontal space between each component in a row
Vertical space between each row
Constructs a FlowLayout object with the given alignment and the values specified as the gaps between each component in the container managed by this instance of FlowLayout.
Name of component to add.
Actual component being added.
LayoutManager.addLayoutComponent()
Does nothing.
The alignment constant for this FlowLayout.
The horizontal gap between components.
The vertical gap between components.
The container that needs to be redrawn.
LayoutManager.layoutContainer()
Draws the components contained within the target container.
The container whose size needs to be calculated.
Minimum Dimension of container target
LayoutManager.minimumLayoutSize()
Calculates minimum size of target container.
The container whose size needs to be calculated.
Preferred Dimension of container target
LayoutManager.preferredLayoutSize()
Calculates preferred size of target container.
Component to stop tracking.
LayoutManager.removeLayoutComponent()
Does nothing.
Alignment of components within container
Sets the alignment for the FlowLayout.
The horizontal gap value.
Sets the horizontal gap between components.
The vertical gap value.
Sets the vertical gap between components.
A string representation of the FlowLayout object.
Object.toString()
Component, Container, Dimension, LayoutManager, Object, Serializable, String