horizontalBoxPane

NXML file equivalent: BoxLayout.

Arranges components in a box configuration from left-to-right (horizontally), in the order that you add the components to the container. You can drag and drop components already in the horizontalBoxPane to manually re-order them.

The Layout Wizard provides the following settings for a horizontalBoxPane:

 

Setting

Description

Options

Alignment

Specifies vertical alignment of components within container.

Start  Arranged from left of container.

Center  Arranged from center of container.

End – Arranged from right of container.

Stretch – Stretches component to fit left to right across container.

Pack

Specifies horizontal alignment of components within container.

Start - Arranged from top of container.

Center - Arranged from center of container.

End Arranged from bottom of container

 

In addition to the layout properties, you can set the following component properties associated with a horizontalBoxPane layout for components you place in a horizontalBoxPane.

Component Properties:

Setting

Description

Flex

A flex value specifies that a component decreases or increases in size in relation to changes in the size of the container.

In addition, the specific Flex value (1, 2, 5 and so forth) specifies the size of this component as a proportion of the space available in the container along the axis of the pane's horizontal orientation.

 

Note: For NXML file BoxLayout, you must specify the orientation as vertical or horizontal.