My test app's flow uses multiple screens :
start(Stage stage) -> Screen 1
-> Screen 2
-> ...
I want to implement some of my screens in fxml, but can't figure what's the best practise way to switch between them.
How can i implement some quit-event mechanism in the screen 1 controller, when screen 1 reached its final state, and connect it to the "main loop" to delete screen 1 and update the scene with screen 2 ?