addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent windowevent)
{
Window window=windowevent.getWindow();
window.dispose();
System.exit(0);
}
});
请解释这段代码的结构?实现的功能?
public void windowClosing(WindowEvent windowevent)
{
Window window=windowevent.getWindow();
window.dispose();
System.exit(0);
}
});
请解释这段代码的结构?实现的功能?
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent windowevent)
{
Window window=windowevent.getWindow();
window.dispose(); //释放资源
System.exit(0); //退出窗口系统
}
});
public void windowClosing(WindowEvent windowevent)
{
Window window=windowevent.getWindow();
window.dispose(); //释放资源
System.exit(0); //退出窗口系统
}
});