Skip to content

Instantly share code, notes, and snippets.

@geoaxis
Last active November 22, 2021 23:44
Show Gist options
  • Save geoaxis/44033d522deaa0e5ca61947742fa7fe2 to your computer and use it in GitHub Desktop.
Save geoaxis/44033d522deaa0e5ca61947742fa7fe2 to your computer and use it in GitHub Desktop.
@SpringBootApplication
public class BlessedJavafxRpi3Application extends Application {
@Autowired
private SensorTagScannerController sensorTagScannerController;
public static void main(String[] args) {
Application.launch();
}
@Override
public void init() {
SpringApplication.run(getClass()).getAutowireCapableBeanFactory().autowireBean(this);
}
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(BlessedJavafxRpi3Application.class.getResource(
"sensor-tag-scanner-view.fxml"));
fxmlLoader.setControllerFactory(param -> sensorTagScannerController);
Scene scene = new Scene(fxmlLoader.load(), 800, 480);
stage.setTitle("Sensor Tag Viewer!");
stage.setScene(scene);
stage.show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment