Pre-initialize JavaFX

This commit is contained in:
Reinhard Pointner 2016-05-10 21:19:02 +08:00
parent e168f18dd4
commit de20963b49

View File

@ -132,9 +132,19 @@ public class Main {
SwingEventBus.getInstance().post(new FileTransferable(files));
}
// wait for UI to startup completely before loading more classes
Thread.sleep(1000);
// preload media.types (when loaded during DnD it will freeze the UI for a few hundred milliseconds)
MediaTypes.getDefault();
// JavaFX is used for ProgressMonitor and GettingStartedDialog
try {
initJavaFX();
} catch (Throwable e) {
debug.log(Level.WARNING, "Failed to initialize JavaFX", e);
}
// check for application updates
if (!"skip".equals(System.getProperty("application.update"))) {
try {