java text box in jframe code example
Example 1: get value textfield java
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
String textFieldValue = testField.getText();
// .... do some operation on value ...
}
})
Example 2: get text from a jtextfield
JTextField yourInpuFieldt = new JTextField(16);
yourInputField.setText("put your text here");
String x = yourInputField.getText();