一下是我自己写的一个简单类,然后到按钮时间时想实现点击按钮,然后将其他模块保存在一个文本文件的所有学生信息全部显示出来,现在button事件不会实现输出,请高手给帮下忙,新手,分不多,见谅。多谢帮助
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
public class AllSudent extends Frame implements ActionListener{
TextArea text1;
Button button;
void WindowTextArea(){
setLayout(new FlowLayout());
button=new Button("确定查询");
add(text1);
add(button);
text1.setEditable(false);
button.addActionListener(this);
setBounds(100,100,350,160);
setVisible(true);
validate();
}
public void actionPerformed(ActionEvent e){
if(e.getSource()==button){
}
}
}