publicclassPoliceListen00implementsMyCommandListener{privateJTextFieldtextInput,textInput1;JTextAreatextShow;新建个人通讯录a;Object[]b=newObject[2];publicvoidactionPerfor...
public class PoliceListen00 implements MyCommandListener {
private JTextField textInput,textInput1;
JTextArea textShow;
新建个人通讯录 a;
Object [] b=new Object[2];
public void actionPerformed(ActionEvent e) {
String str=textInput.getText();
String str1=textInput1.getText();
System.out.println(str);
System.out.println(str1);
Succes succes=new Succes();
if(str!=null){
succes.setVisible(true);
succes.setBounds(120, 120, 500, 300);
succes.setTitle("保存成功");
}else{
succes.setVisible(false);
}
}
public void setJTextField(JTextField text) {
textInput=text;
}
public void setJTextArea(JTextArea area) {
textShow=area;
}
}
展开