[Solved] How to handle JTextField value retainment without add it into a Dialog? [closed]

To solve the problem declare the textfield as static: //JTextField Declaration and Initialization static JTextField NODES_TEXT_FIELD = new JTextField(); After that catch the value of the TextField: int nodes = Integer.valueOf(NODES_TEXT_FIELD.getText()); In my case was an int value, switch yourself; After that clear the value of the textfield cos it will be stored since the … Read more

[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