Issue
I have a collection of buttons:
VBox menuButtons = new VBox();
menuButtons.getChildren().addAll(addButton, editButton, exitButton);
I want to add some spacing between these buttons, without using a CSS style sheet. I think there should be a way to do this.
setPadding();
is for the Button
s in the VBox
.
setMargin();
should be for the VBox
itself. But I didn't find a way for the spacing between the buttons.
I'm glad for any ideas. :)
Solution
VBox
supports spacing:
VBox menuButtons = new VBox(5);
or
menuButtons.setSpacing(5);
Answered By - Sergey Grinev
Answer Checked By - Clifford M. (JavaFixing Volunteer)