Java java.awt FlowLayout fields, constructors, methods, implement or subclass

Example usage for Java java.awt FlowLayout fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt FlowLayout.

The text is from its open source code.

Field

intLEFT
This value indicates that each row of components should be left-justified.
intCENTER
This value indicates that each row of components should be centered.
intRIGHT
This value indicates that each row of components should be right-justified.
intLEADING
This value indicates that each row of components should be justified to the leading edge of the container's orientation, for example, to the left in left-to-right orientations.
intTRAILING
This value indicates that each row of components should be justified to the trailing edge of the container's orientation, for example, to the right in left-to-right orientations.

Constructor

FlowLayout()
Constructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.
FlowLayout(int align)
Constructs a new FlowLayout with the specified alignment and a default 5-unit horizontal and vertical gap.
FlowLayout(int align, int hgap, int vgap)
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.

Method

voidaddLayoutComponent(String name, Component comp)
Adds the specified component to the layout.
intgetAlignment()
Gets the alignment for this layout.
booleangetAlignOnBaseline()
Returns true if components are to be vertically aligned along their baseline.
intgetHgap()
Gets the horizontal gap between components and between the components and the borders of the Container
intgetVgap()
Gets the vertical gap between components and between the components and the borders of the Container .
voidlayoutContainer(Container target)
Lays out the container.
DimensionminimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the visible components contained in the specified target container.
DimensionpreferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the visible components in the specified target container.
voidsetAlignment(int align)
Sets the alignment for this layout.
voidsetAlignOnBaseline(boolean alignOnBaseline)
Sets whether or not components should be vertically aligned along their baseline.
voidsetHgap(int hgap)
Sets the horizontal gap between components and between the components and the borders of the Container .
voidsetVgap(int vgap)
Sets the vertical gap between components and between the components and the borders of the Container .
StringtoString()
Returns a string representation of this FlowLayout object and its values.