Populate Choicebox defined in FXML
问题 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 with controller class. I would like to know, how to populate this choicebox with data in the controller class, because using @FXML reference to this choicebox throws NullpointerEception EDIT - added source code FXML code <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="240.0"