200k views
5 votes
The three buttons at the bottom should grow to fill their enclosing HBox. Buttons require an extra step that was not needed with text fields. To achieve this, make sure you read and understand all of the starter code in the HBox documentation:

a. True

b. False

1 Answer

1 vote

Final answer:

The three buttons at the bottom should grow to fill their enclosing HBox. To achieve this, set the grow property of each button to true.

Step-by-step explanation:

The answer to this question is a. True.

The starter code in the HBox documentation provides instructions on how to make buttons grow to fill their enclosing HBox. To achieve this, a property called

grow

can be set to

true

for each button. Here is an example:



Button button1 = new Button();

HBox.setHgrow(button1, Priority.ALWAYS);



This will make the button grow to fill the available space within the HBox. It wasn't needed with text fields because text fields automatically fill their enclosing HBox by default.

User Jim Archer
by
7.9k points