从JTextField中获取值&将其重写到现有变量中。从JTextField获取值并将其重写到现有变量中
例如:
public class variables{
String var = "hi";
public static void main(String[]args){
//do sth
}
}
然后接口读取来自主类的值&的值从一个JTextField改变
private void changeVariableActionPerformed(java.awt.event.ActionEvent evt) {
variables.var = txtField.getText();
//then into textfield we write bye & variables.var takes the value of bye
//variables.var = "bye"
}
我想改变变种的与动作的值来执行
添加有关更新的通知的一些信息。你提到获得的价值,但是什么行动导致提示 –