[Solved] how to put JavaFX in JPanel?

Use a JFXPanel. From the documentation => public class Test { private static void initAndShowGUI() { // This method is invoked on Swing thread JFrame frame = new JFrame(“FX”); final JFXPanel fxPanel = new JFXPanel(); frame.add(fxPanel); frame.setVisible(true); Platform.runLater(new Runnable() { @Override public void run() { initFX(fxPanel); } }); } private static void initFX(JFXPanel fxPanel) { … Read more