1.1 --- a/boot-fx/src/test/java/net/java/html/boot/fx/FXBrowsersOnResourceTest.java Fri Oct 02 08:57:14 2015 +0200
1.2 +++ b/boot-fx/src/test/java/net/java/html/boot/fx/FXBrowsersOnResourceTest.java Sun Oct 11 07:24:32 2015 +0200
1.3 @@ -71,7 +71,15 @@
1.4 new Thread("initFX") {
1.5 @Override
1.6 public void run() {
1.7 - App.launch(App.class);
1.8 + if (Platform.isFxApplicationThread()) {
1.9 + new App().start(new Stage());
1.10 + } else {
1.11 + try {
1.12 + App.launch(App.class);
1.13 + } catch (IllegalStateException ex) {
1.14 + Platform.runLater(this);
1.15 + }
1.16 + }
1.17 }
1.18 }.start();
1.19 App.CDL.await();
1.20 @@ -182,7 +190,7 @@
1.21 }
1.22
1.23 @Override
1.24 - public void start(Stage stage) throws Exception {
1.25 + public void start(Stage stage) {
1.26 pane= new BorderPane();
1.27 Scene scene = new Scene(pane, 800, 600);
1.28 stage.setScene(scene);