FXHelper was created to reduce the pain in the butt of repetitive work with FXMLLoader, FXThread.
include FXHelper 2.0.jar in your project download
- To create a window and open it
FXHelper.openWindowAsync(MainLauncher.class.getResource("/views/main_window.fxml"))
.open();
- To create a window and do whatever you want on Window Created
FXHelper.createWindowAsync(MainLauncher.class.getResource("/views/main_window.fxml"))
.onDone((stage, scene, controller) -> {/*your code here*/});
.create();
- To load FXML File and do whatever you want on Fxml file Loaded
FXHelper.loadFXMLAsync(MainLauncher.class.getResource("/views/main_window.fxml"))
.onLoaded((root, controller) -> {/*your code here*/})
.load();