如何在程序停止时阻止 jframe 关闭?
我正在使用 jframe 创建一个窗口。但是当程序终止时,窗口将关闭。我希望即使程序关闭时窗口也能保持打开状态。
除了显示文本之外,该窗口没有任何功能。我尝试使用以下方法编辑默认关闭过程:
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
但这并不能阻止程序停止时窗口关闭。 有没有办法即使程序停止时也保持此窗口/jframe 打开?
I am creating a window with a jframe. But when the program terminates the window closes. I want to the window to stay up even when the program closes.
The window doesn't have any functionality apart from displaying from text. I have tried to edit the default close process with:
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
But this doesn't stop the window from closes when the program stops.
Is there a way to keep this window/jframe open even when the program stops?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论