Fadel
Fadel

Reputation: 43

JavaFX in Swing useability

I have a desktop application written with Swing, I've incorporated a JavaFX component to my application through JFXPanel. Everything runs fine but just one time. When I close the JFrame with the JavaFX components and later try to open it again by creating new JFrame, the space with the JXPanel is empty.

    Platform.runLater(new Runnable() {
      public void run() {
        Scene scene = new Scene( mainPane );
        setScene(scene);
      }
    });

this is how I run the JFXPanel.

Upvotes: 2

Views: 94

Answers (1)

tomsontom
tomsontom

Reputation: 5887

You need to call Platform.setImplicitExit(false)

Upvotes: 2

Related Questions