Q:

Button positioning using HBox javafx

I am trying to place my two button directly under my label and have everything centered on my form. Currently everything is just printed on one line. 
@Override
    public void start(Stage primaryStage) throws Exception{
    HBox hb = new HBox();
    hb.setSpacing(15);
    hb.setPadding(new Insets(15, 20, 5, 10));
    hb.setAlignment(Pos.CENTER);

    Label label = new Label("Greetings! Would you like to purchase cruise ticket for a family of two?");
    hb.getChildren().add(label);

    button1 = new Button("Yes");
    hb.getChildren().add(button1);
    button1.setOnAction(this);

    button2 = new Button("No");
    hb.getChildren().add(button2);
    button2.setOnAction(this);

    Scene scene = new Scene(hb, 550, 250);
    primaryStage.setTitle("Cruise for two!");
    primaryStage.setScene(scene);
    primaryStage.show();
}

A:

For more information on the many layout options available in JavaFX, Oracle provides a great tutorial that I recommend you review!

The HBox will always arrange its children in a horizontal row.  By adding your Label to the HBox, JavaFX is doing what you're telling it to.
You also have a VBox, which arranges nodes vertically. Within the VBox, add your Label and then your HBox; they will be arranged with the HBox under the Label.
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class Main extends Application {

    private Button button1;
    private Button button2;

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {

        VBox root = new VBox(5);
        root.setPadding(new Insets(10));
        root.setAlignment(Pos.CENTER);

        HBox hb = new HBox();
        hb.setSpacing(15);
        hb.setPadding(new Insets(15, 20, 5, 10));
        hb.setAlignment(Pos.CENTER);

        Label label = new Label("Greetings! Would you like to purchase cruise ticket for a family of two?");
        root.getChildren().add(label);

        button1 = new Button("Yes");
        hb.getChildren().add(button1);

        button2 = new Button("No");
        hb.getChildren().add(button2);

        root.getChildren().add(hb);

        Scene scene = new Scene(root, 550, 250);
        primaryStage.setTitle("Cruise for two!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}

RESULT:

