In Java FX 2, creating a new stage using a JFXPanel embedded stage window as the owner of the new stage results in ClassCastException.
Stack-trace:
Error: Unsupported type of owner com.sun.javafx.tk.quantum.EmbeddedStage@1c7a22a
java.lang.ClassCastException: com.sun.javafx.tk.quantum.EmbeddedStage cannot be cast to com.sun.javafx.tk.quantum.WindowStage
at com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:422)
at javafx.stage.Window$10.invalidated(Window.java:741)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
at javafx.stage.Window.setShowing(Window.java:781)
at javafx.stage.Window.show(Window.java:796)
at javafx.stage.Stage.show(Stage.java:229)
Stack-trace:
Error: Unsupported type of owner com.sun.javafx.tk.quantum.EmbeddedStage@1c7a22a
java.lang.ClassCastException: com.sun.javafx.tk.quantum.EmbeddedStage cannot be cast to com.sun.javafx.tk.quantum.WindowStage
at com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:422)
at javafx.stage.Window$10.invalidated(Window.java:741)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
at javafx.stage.Window.setShowing(Window.java:781)
at javafx.stage.Window.show(Window.java:796)
at javafx.stage.Stage.show(Stage.java:229)