testField.getText()
See the java doc for JTextField
Sample code can be:
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
String textFieldValue = testField.getText();
// .... do some operation on value ...
}
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…