Javatpoint Logo
Javatpoint Logo

JavaFX VBox

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.

Property Description Setter Methods
Alignment This property is for the alignment of the nodes. setAlignement(Double)
FillWidth 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. setFillWidth(boolean)
Spacing This property is to set some spacing among the nodes of VBox. setSpacing(Double)


  1. VBox() : creates layout with 0 spacing
  2. Vbox(Double spacing) : creates layout with a spacing value of double type
  3. Vbox(Double spacing, Node? children) : creates a layout with the specified spacing among the specified child nodes
  4. Vbox(Node? children) : creates a layout with the specified nodes having 0 spacing among them



JavaFX VBox output
Next TopicJavaFX StackPane

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA