Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

I read the textbook, and I am still struggling to fully understand what the difference is between the two

asked ago in CSC 305 Fall 2024 by (312 points)

2 Answers

+3 votes
 
Best answer

HBox containers are horizontal and on the top or bottom, whilst VBox containers are vertical and on the left or right.

answered ago by (629 points)
selected ago by
+3 votes

They are both containers of nodes, but they differ in how the nodes are displayed. Your nodes (botton, label, etc.) appears on a row in Hbox, while they will appears on a column in VBox.

Here's the source: https://docs.oracle.com/javafx/2/layout/builtin_layouts.htm

answered ago by (528 points)
...