Solved

Consider the Following Code

Question 58

Short Answer

Consider the following code:
import javafx.scene.control.*;
import javafx.scene.layout.*;
public class BoardGame extends BorderPane
{
private Button one, two;
private HBox bottomBox;
private Label topLabel;
public BoardGame( )
{
// you are coding inside the BoardGame constructor
Assuming that the four previous steps have already taken place, add the buttons one and two to bottomBox. To add nodes to an HBox, we must first retrieve its children by calling its getChildren method, then call addAll, passing the list of nodes to add. These two methods have the following API:
In Class Pane (superclass of HBox): ObservableList getChildren( )
In Class ObservableList: boolean addAll( E... elements )

Correct Answer:

verifed

Verified

bottomBox....

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions