Layout Containers

Layout containers are used primarily to arrange other components on the screen. Layout containers include:

  • FlowPane - Arranges components in a horizontal line, wrapping when contents don't fit on a single line.

  • BoxPane - Arranges components in a line, either vertically or horizontally.

  • FillPane - Arranges components in a line, either vertically or horizontally and fills up the available space in both directions.

  • GridPane - Arranges components in a two-dimensional grid where each cell is given the same size, based on the available width and height.

  • TablePane - Arranges components in a two-dimensional table structure, optionally spanning table cells.

  • Border - Container with an optional title that draws a border around a single content component.

  • StackPane - Arranges components in layers, like a stack of transparencies.

  • SplitPane - Provides a draggable divider between two components allowing a user to dynamically change the size of each; may be horizontal or vertical.

  • Form - Arranges components in a "form" layout with labels to the left and optional flag messages (e.g. to alert a user to input errors) to the right.

  • Panel - Performs no layout, allowing the application to specify absolute component positions and sizes.

Each of these are discussed in detail in the following sections.

Next: Flow Panes