Possible values areĪlign - one of the alignment values shown above ![]() Possible values are FlowLayout.LEFT, FlowLayout.RIGHT, FlowLayout.CENTER, FlowLayout.LEADING, or FlowLayout.TRAILING. Vgap - the vertical gap between components Hgap - the horizontal gap between componentsĪnd between the components and the borders of the Container ![]() The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, Returns a string representation of this FlowLayout object and its values.ġ.2 Package-private pending API change approvalĬonstructs a new FlowLayout with the specified alignment and a default 5-unit horizontal and vertical gap. Removes the specified component from the layout. Returns the preferred dimensions for this layout given theĬomponents in the specified target container. Returns the minimum dimensions needed to layout theĬomponents contained in the specified target container. 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.Ĭonstructs a new FlowLayout with a centered alignment and a default 5-unit horizontal and vertical gap.Ĭonstructs a new FlowLayout with the specified alignment and a default 5-unit horizontal and vertical gap.Ĭreates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps.Īdds the specified component to the layout.Ĭomponents and between the components and the borders of the ContainerĬomponents and between the components and the borders of the Container. This value indicates that each row of components should be right-justified. This value indicates that each row of components should be left-justified. 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. This value indicates that each row of components should be centered. Each line is centered.įor example, the following picture shows an applet using the flow layout manager (its default layout manager) to position three buttons:Ī flow layout lets each component assume its natural (preferred) size. It will arrange buttons left to right until no more buttons fit on the same line. ![]() The line alignment is determined by the align property. It arranges buttons horizontally until no more buttons fit on the same line. The flow direction is determined by the container's componentOrientation property and may be one of two values:įlow layouts are typically used to arrange buttons in a panel. Class FlowLayout įlow, much like lines of text in a paragraph.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |