import javafx.application.Application; import javafx.geometry.NodeOrientation; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.scene.control.ChoiceBox; public class ChoiceBoxSample extends Application { private void init(Stage primaryStage) { Group root = new Group(); primaryStage.setResizable(false); primaryStage.setScene(new Scene(root, 150, 100)); primaryStage.getScene().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); ChoiceBox cb = new ChoiceBox(); cb.getItems().addAll("Dog", "Horse", "Cat", "Monkey", "Rabbit"); cb.getSelectionModel().select("Horse"); root.getChildren().add(cb); } @Override public void start(Stage primaryStage) throws Exception { init(primaryStage); primaryStage.show(); } public static void main(String[] args) { launch(args); } }