public void actionPerformed(ActionEvent e) {
if (e.getSource() == text1) {
// String word=text1.getText();
String word = e.getActionCommand();
int a = Integer.parseInt(word);
int m = a * a;
text2.setText(m);出现这样错误信息
Exception in thread "AWT-EventQueue-0" java.lang.Error: 无法解析的编译问题:
类型 TextField 中的方法 setText(String)对于参数(int)不适用怎么会对int类型不适用,请教高手