我可以使用JOptionPane.showConfirmDialog来调度JInternalFrame吗? [英] May i can use JOptionPane.showConfirmDialog for dispay JInternalFrame?

查看:147
本文介绍了我可以使用JOptionPane.showConfirmDialog来调度JInternalFrame吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用 JOptionPane.showConfirmDialog 显示 JInternalFrame

我尝试了以下代码:

OPD.Registration opdRegister = new OPD.Registration(); 
//OPD.Registration is extending JInternalFrame    

int ns=JOptionPane.showConfirmDialog(null, opdRegister, "Billing", JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE);
// i am trying to call opdregister in this Confirm Dialog Box.

使用上面显示对话框的代码 JInternalFrame 但显示不正确。它只显示标题栏。其他数据从 JInternalFrame 中删除​​。

By using above code that display dialog box with JInternalFrame but it not display proper. It display only title bar. Other data are cut from the JInternalFrame.

如何增加此对话框的大小?

How can I increase size of this dialog?

推荐答案

是,虽然 JInternalFrame 打算用于 JDesktopPane 。如果您只看到标题栏,请确认您的内容包含首选尺寸包()内部框架,如此处所示。

Yes, although a JInternalFrame is intended for use in a JDesktopPane. If you're seeing only the title bar, verify that your content has a preferred size and pack() the internal frame, as shown here.

这篇关于我可以使用JOptionPane.showConfirmDialog来调度JInternalFrame吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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