use fxml for dispatching events.