Event Based Programming in JavaFX