I have this part of the program, but I amstuck.
The final price must be displayed in a JOptionPaneMessage
public class BrandisBagelShop extends Application{
public static void main(String [] args){
launch(args);
}//end main method
@Override
public void start(Stage primaryStage) throws Exception {
Label lb1 = new Label(“Bagel”, getVBoxLeft());
lb1.setContentDisplay(ContentDisplay.BOTTOM);
Label lb2 = new Label(“Topping”, getVBoxCenter());
lb2.setContentDisplay(ContentDisplay.BOTTOM);
Label lb3 = new Label(“Coffee”, getVBoxRight());
lb3.setContentDisplay(ContentDisplay.BOTTOM);
BorderPane pane = new BorderPane();
//Place nodes in the pane
pane.setTop(new CustomPane(“Welcome to Brandi’s BagelHouse”));
pane.setLeft(lb1);
pane.setCenter(lb2);
pane.setRight(lb3);
pane.setBottom(getHBoxBotton());
Scene scene = new Scene(pane);
primaryStage.setScene(scene);
primaryStage.setTitle(“Order Calculator”);
primaryStage.show();
}
class CustomPane extends StackPane{
public CustomPane(String title) {
getChildren().add(new Label (title));
setPadding(new Insets(10,80,10,80));
}
}
private