I\'m learning javaFX and my problem is that I have simple window with some choicebox and button. This window is defined via FXML which is also associated wi
@using FXML STEP 1: Add a choice box in the scene builder and call it maybe(choiceBox) STEP 2: IN the controller add the following codes @FXML private ChoiceBox choiceBox ;
@Override
public void initialize(URL url, ResourceBundle rb) {
ObservableList list = FXCollections.observableArrayList();
list.addAll("choice1", "choice2","choice3");
//populate the Choicebox;
choiceBox .setItems(list);
}