在netbeans中调整jdialogbox的大小

发布于 2024-09-24 16:00:59 字数 199 浏览 1 评论 0原文

我在 Netbeans IDE 6.9 中创建了一个应用程序。我的大多数对话框都有不同的大小。但是当我运行应用程序时,所有对话框都具有相同的大小,并且该大小是最大对话框的大小。在眼睛预览按钮中,我得到不同的大小,只有当我运行应用程序时,我才得到相同的大大小。谁能建议可能是什么问题? 有没有什么方法可以自动调整对话框的大小,即我不应该指定大小,对话框应该相应地调整其大小。 -提前致谢

I've created an application in Netbeans IDE 6.9. I've different sizes of most of the dialog boxes. But when i run the application, all my dialog boxes have the same size and that size is that of the biggest dialog box.In the eye preview button i get different sizes, only when I run the application I get the same big size. Can anyone suggest what the problem maybe?
And is there any way in which the dialog box are sized automatically,i.e. I should not specify the size, the dialog boxes should adjust their sizes accordingly.
-Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

╭ゆ眷念 2024-10-01 16:00:59

1.打开设计视图。

2. 右键单击​​ JDialog 窗体并选择“属性”。

3.在属性中选择属性选项卡。

4.在其他属性中,取消选中“可调整大小”复选框,并在首选大小中指定所需的大小。

5.现在清洁&重建项目。
——会起作用的。

1.Open the design view.

2.Right click on the JDialog Form and select Properties.

3.In the properties select properties tab.

4.In the other properties uncheck the "resizable" check box and in Preffered Size give the size you want.

5.Now clean & rebuild the project.
--It will work.

暖阳 2024-10-01 16:00:59

Generate Resize Code

如果您想完全控制所需的大小,请勿使用 pack()

在屏幕中使用以下设置。

Generate Resize Code

If you want to have total control on your desired size, do not use pack()

Use the following setting in the screen.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文