import java.awt.Button;
import java.awt.Frame;
import java.awt.Panel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* 给按钮注册事件监听器
* @author Chenkunqing
*
*/
public class TestButtonListener {
public static void main(String[] args) {
new MyButton();
}
}
class MyButton extends Frame{
public MyButton(){
this.setBounds(300,300,400,400);
this.setVisible(true);
// 窗口显示界面设置。
Button b &#