import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class ComboBox2 extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Combo Box"); ComboBox cmb = new ComboBox(); cmb.getItems().addAll("Live and let die", "Tomorrow never dies", "Octopussy"); StackPane root = new StackPane(); root.getChildren().add(cmb); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); } }