Skip to content

Commit

Permalink
Force toolkit initialization when calling GroovyFx.start
Browse files Browse the repository at this point in the history
Fixes #42
  • Loading branch information
aalmiray committed Oct 6, 2016
1 parent 9a8da77 commit 09db812
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/groovy/groovyx/javafx/GroovyFX.java
Expand Up @@ -17,6 +17,7 @@

import groovy.lang.Closure;
import javafx.application.Application;
import javafx.embed.swing.JFXPanel;
import javafx.stage.Stage;
import org.codehaus.groovy.runtime.InvokerHelper;

Expand All @@ -28,6 +29,10 @@
public class GroovyFX extends Application {
public static Closure closure;

static {
new JFXPanel();
}

@Override
public void start(Stage primaryStage) throws Exception {
try {
Expand Down

0 comments on commit 09db812

Please sign in to comment.