How to retrieve stage from UI control in JavaFX

controls, javafx-2, stage

Solution

((Stage) Control.getScene().getWindow())

Problem

The question is pretty simple, but I haven't found any examples relating to this. I want to obtain the containing Stage of a UI Control in JavaFX. Is there a way to do this?

Original source