--- old/modules/graphics/src/main/java/javafx/stage/Stage.java 2015-05-15 12:02:19.753114100 -0700 +++ new/modules/graphics/src/main/java/javafx/stage/Stage.java 2015-05-15 12:02:18.923113000 -0700 @@ -456,6 +456,10 @@ throw new IllegalStateException("Stage already visible"); } + if (!Toolkit.getToolkit().canStartNestedEventLoop()) { + throw new IllegalStateException("showAndWait is only allowed only while handling system events"); + } + // TODO: file a new bug; the following assertion can fail if this // method is called from an event handler that is listening to a // WindowEvent.WINDOW_HIDING event.