java 打开frame_java – 打开一个新的JFrame

>无法抗拒,简单不同意答案JFrame frame = new JFrame();和frame.setVisible(true);

I want to open a new JFrame when the user hits the first calculate

button and serve as a Output window (Simlar to SPSS output windows if

you are familiar with them).

> don’t do that, create only two JFrames,重用第二名. JFrame使用getContentPane.removeAll(),来自JButton的其他操作

>那么所有生命周期都只是关于setVisible(true)/ setVisible(false)

>将DefaultCloseOperations更改为HIDE_ON_CLOSE

The New JFrame will be completely separate and will have its own menu

bar. A simple JDialog is not the way to go here.

> JDialog有什么问题,工具栏中只有一个按钮与JFrame中的三个按钮相比,简单不同意,

Output window (Simlar to SPSS output windows if you are familiar with

them).

>使用SwingWorker或Runnable #Thread(必需包装到invokeLater)获取放入JDialog的JComponents的值,如果所有更改都完成,则调用JDialog.setVisible(true)包装到invokeLater()中

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值