public class VBox extends Pane
A layout pane that arranges its children in a vertical column.
  • Constructor Details

    • VBox

      public VBox()
      Constructs a new VBox with a spacing of 0.
    • VBox

      public VBox(int spacing)
      Constructs a new VBox with the given spacing.
      Parameters:
      spacing - the vertical spacing between children
    • VBox

      public VBox(Node... children)
      Constructs a new VBox with the given children.
      Parameters:
      children - the children of the VBox
    • VBox

      public VBox(int spacing, Node... children)
      Constructs a new VBox with the given spacing and children.
      Parameters:
      spacing - the vertical spacing between children
      children - the children of the VBox
  • Method Details

    • getSpacing

      public int getSpacing()
      Returns the amount of vertical space between each child node.
      Returns:
      the vertical spacing between children
    • setSpacing

      public void setSpacing(int spacing)
      Sets the amount of vertical space between each child node.
      Parameters:
      spacing - the vertical spacing between children
    • layoutChildren

      protected void layoutChildren()
      Overrides:
      layoutChildren in class Parent