[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