博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DISPOSE_ON_CLOSE 和 EXIT_ON_CLOSE 的区别
阅读量:4497 次
发布时间:2019-06-08

本文共 586 字,大约阅读时间需要 1 分钟。

If you have several JFrames open and you close one that has EXIT_ON_CLOSE it will close all the JFrames and exit the app.

If you close one that has DISPOSE_ON_CLOSE only that one JFrame will be closed.
If you only have one JFrame there isn't a real difference unless you have other non-deamon threads running.

let's say you have an application which opens with a login dialog box

after logging in
DISPOSE_ON_CLOSE will dispose of the login dialog box, then proceed with the rest of the program
EXIT_ON_CLOSE will terminate the program

转载于:https://www.cnblogs.com/fengjian/p/3479876.html

你可能感兴趣的文章
数据解析01-15
查看>>
linux 安装mysql数据库——yum安装法
查看>>
Several ports (8005, 80, 8009) required by Tomcat v6.0 Server at localhost are already in use
查看>>
事件监听器
查看>>
设计模式之单例设计模式
查看>>
异常的基本概念
查看>>
vue 在发送axios请求时数据渲染问题
查看>>
动态链接库dll
查看>>
2018 Multi-University Training Contest 3 - HDU Contest
查看>>
组合数取模(转载)
查看>>
9.2NOIP模拟题
查看>>
整合SpringDataJpa
查看>>
vue过渡
查看>>
tcpreplay 博客目录
查看>>
oracle11g忘记sys密码
查看>>
文件各种上传,离不开的表单
查看>>
mysql查询插入优化
查看>>
hadoop备战:yarn框架的搭建(mapreduce2)
查看>>
微信公众号开发模式开启总结
查看>>
pygame-KidsCanCode系列jumpy-part2-加速度与摩擦力
查看>>