Instead of arranging the nodes in horizontal row, Vbox Layout Pane arranges the nodes in a single vertical column. It is represented by javafx.scene.layout.VBox class which provides all the methods to deal with the styling and the distance among the nodes. This class needs to be instantiated in order to implement VBox layout in our application.
This Method Provides various properties which are described in the table below.
||This property is for the alignment of the nodes.
||This property is of the boolean type. The Widtht of resizeable nodes can be made equal to the Width of the VBox by setting this property to true.
||This property is to set some spacing among the nodes of VBox.
- VBox() : creates layout with 0 spacing
- Vbox(Double spacing) : creates layout with a spacing value of double type
- Vbox(Double spacing, Node? children) : creates a layout with the specified spacing among the specified child nodes
- Vbox(Node? children) : creates a layout with the specified nodes having 0 spacing among them