为什么关闭窗口显示不了out里面的话
高手们帮我看一下这个事件哪里有问题,谢谢了
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class WindowDemo extends JFrame
{
public WindowDemo()
{
this.addWindowListener(new WindowAdapter()
{
public void widowClosing(WindowEvent w)
{
//无法执行语句
System.out.println ("Hello!");
}
});
this.setSize(300,200);
this.setVisible(true);
}
public static void main(String[] args)
{
new WindowDemo();
}
}