1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| @FXML
protected void handleAdd() throws IOException
{
stage = new Stage();
stage.initModality(Modality.WINDOW_MODAL);
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/AjoutEquipage.fxml"));
Pane myPane=(Pane) fxmlLoader.load();
control = context.getBean(AjoutEquipageController.class);
// control = (AjoutEquipageController) fxmlLoader.getController();
control.listActivites.getItems().setAll(data);//remplir la combobox
control.listActivites.valueProperty().addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> ov, Object t, Object t1) {
creatView(control.vbox,t1);
}
});
Scene scene = new Scene(myPane,800,600);
stage.setScene(scene);
stage.show();
} |
Partager