CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics

Window Not Appearing

Java quiz · Question 45
easyJavaFX

This JavaFX app compiles and runs but no window appears. What is the bug?

Code

1@Override
2public void start(Stage primaryStage) {
3 VBox root = new VBox();
4 root.getChildren().add(new Label("Hello!"));
5 Scene scene = new Scene(root, 400, 300);
6 primaryStage.setScene(scene);
7 primaryStage.setTitle("My App");
8 // window never appears
9}