2

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.

BuZZ-dEE
  • 6,075
  • 12
  • 66
  • 96
Fadel
  • 43
  • 4
  • 1
    *"..by creating new JFrame.."* 1) See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/a/9554657/418556) 2) For better help sooner, post an [MCVE](http://stackoverflow.com/help/mcve) (Minimal Complete and Verifiable Example). – Andrew Thompson Jun 08 '14 at 04:02

1 Answers1

2

You need to call Platform.setImplicitExit(false)

tomsontom
  • 5,856
  • 2
  • 23
  • 21