public class Controller {

@Inject
private XyService xyService;

@Inject
@Bundle
private ResourceBundle rb;

@Inject
private Event<FooBar> foobarEvent;

public void on(@Observes Event<OtherEvent> event) {
    ...
}


@Inject
@Bundle("bundles/Application")
private final FXMLLoader fxmlLoader;

public void start(final Stage stage, final Application.Parameters parameters) throws Exception {
    final Parent mainWindow = fxmlLoader.load(getClass().getResourceAsStream("application.fxml"));
    final Scene scene = new Scene(mainWindow);
    stage.setScene(scene);
    stage.show();
}

}

Edit
Pub: 28 Feb 2021 06:58 UTC
Edit: 15 Apr 2021 10:04 UTC
Views: 12694