diff --git a/source/net/filebot/UserFiles.java b/source/net/filebot/UserFiles.java index 9f3decbe..29898d3f 100644 --- a/source/net/filebot/UserFiles.java +++ b/source/net/filebot/UserFiles.java @@ -298,13 +298,9 @@ public class UserFiles { public T runAndWait(Callable c) { try { - // initialize JavaFX - new javafx.embed.swing.JFXPanel(); - javafx.application.Platform.setImplicitExit(false); - // run on FX Thread FutureTask task = new FutureTask(c); - javafx.application.Platform.runLater(task); + invokeJavaFX(task); return task.get(); } catch (Exception e) { throw new RuntimeException(e); diff --git a/source/net/filebot/ui/MainFrame.java b/source/net/filebot/ui/MainFrame.java index fdbad107..fc7414b1 100644 --- a/source/net/filebot/ui/MainFrame.java +++ b/source/net/filebot/ui/MainFrame.java @@ -136,9 +136,7 @@ public class MainFrame extends JFrame { } })); - installAction(this.getRootPane(), getKeyStroke(VK_F1, 0), newAction("Help", evt -> { - GettingStartedStage.start(); - })); + installAction(this.getRootPane(), getKeyStroke(VK_F1, 0), newAction("Help", evt -> GettingStartedStage.start())); SwingEventBus.getInstance().register(this); }