For example, I want open a DirectoryChooser when clicking on the button:
you can ask any node for the Scene and then call Scene#getWindow().
Scene
Scene#getWindow()
E.g. ((Node)event.getTarget()).getScene().getWindow()
((Node)event.getTarget()).getScene().getWindow()