2017年楼市分析:关于JAVA的小代码

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 11:56:40
各位前辈:
俺刚自学JAVA
class ExitWindow extends WindowAdapter{
public void windowClosing(WindowEvent e){
System.exit(0);
}
}

上面那段是关闭窗口么?
那和setDefaultCloseOperation(EXIT_ON_CLOSE);有什么不同点呢?

谢谢

没错,是关闭窗口的代码。
和setDefaultCloseOperation(EXIT_ON_CLOSE);的效果完全一样。