Solutions
Pane ANS Base class for layout panes. It contains the get Children() method for returning a list of nodes in
the pane.
Stack Pane ANS Places the nodes on top of each other in the center of the pane.
Flow Pane ANS Places the nodes row-by-row horizontally or column-by-column vertically.
Flow Pane arranges the nodes in the pane horizontally from left to right or vertically from top to bottom in the
order in which they were added. When one row or one column is filled, a new row or column is started
automatically. (see FlowPaneDemo.java)
Grid Pane ANS Places the nodes in the cells in a two-dimensional grid.
A Grid Pane arranges nodes in a grid (matrix) formation. The nodes are placed in the specified column and row
indices. Note: Column indices comes before the row indices and the indices always start from 0. (See
GridPaneDemo.java)
BorderPane ANS Places the nodes in the top, right, bottom, left, and center regions.
BorderPane lays out nodes in five regions: top, left, right, bottom, and center positions BorderPane uses the
setTop(node), setBottom(node), setLeft(node), setRight(node), and setCenter(node) methods to achieve this.
Any of the five positions may be null.
BorderPane is commonly used as the root of a Scene or another layout pane. Default Alignments for each of
the five positions. (See BorderPaneDemo.java) top: Pos.TOP_LEFT bottom: Pos.BOTTOM_LEFT left:
Pos.TOP_LEFT right: Post.TOP_RIGHT center: Pos.CENTER
Hbox ANS Places the nodes in a single row.
An HBox lays out its children in a single horizontal row.
Different from FlowPane which can layout its children into multiple rows and columns, an HBox or a VBox
can lay out its children only in one row or one column.
VBox ANS Places the nodes in a single column.
A VBox lays out its children in a single vertical column.
Different from FlowPane which can layout its children into multiple rows and columns, an HBox or a VBox
can lay out its children only in one row or one column.