//当前类继承于ActionListener
public class FileWindow extends JFrame implements ActionListener,Runnable {
button_input_txt.addActionListener(this); //注册事件
button_input_txt2.addActionListener(this);
public void actionPerformed(ActionEvent e) { //接受所有注册到的事件
// TODO Auto-generated method stub
System.out.println(e.getSource());
}