a.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
...................
}
});
------------------------------------------------------
a.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
....................
}
});
以上两个代码中的ActionListener 和 WindowAdapter 究竟是类名,还是接口名呢?
还有第二段代码中为什么是WindowAdapter而不是WindowListener呢?
------解决方案--------------------------------------------------------