一次只关闭一帧 [英] closing only one frame at a time

查看:118
本文介绍了一次只关闭一帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事与秋千相关的项目,因为当我在执行另一个动作事件后的另一个 frame2 中运行第一个 mainframe1 时,在其中有一个主框架是可见的,但是问题是当我在那个时候关闭最新的框架(即框架2)时,孔程序关闭了,即关闭了mainframe1和frame2.我只想关闭frame2.我该怎么办?

i am work on swing related project in that one main frame is there when i run project in that first mainframe1 is visible after when i perform other action event another frame2 is visible but problem is that when i close latest frame(means frame 2 ) at that time hole program is close i.e closes mainframe1 as well as frame2.i want close only frame2 .what can i do for that?

推荐答案

拆分应用程序运行时和JFrame.
JFrame不是应用程序!功能代码不应位于JFrame中.

是的,我第二个理查德,请显示代码.
Split application runtime and JFrame.
The JFrame is NOT the application! functional code should not be located in a JFrame.

And yes, I second Richard, please show code.


这篇关于一次只关闭一帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆