http://img.my.csdn.net/uploads/201208/08/1344356366_7692.png
------解决方案--------------------------------------------------------
图片是个X。
注册事件监听用:
addWindowListener(new WindowListener() {
......
});
这里面有两个事件可用:
void windowClosing(WindowEvent e)
void windowClosed(WindowEvent e)