自动最大化Java NetBeans组件 [英] Auto Maximizing Java NetBeans Components

查看:105
本文介绍了自动最大化Java NetBeans组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个小型Java应用程序,但是我不擅长使用用户界面或布局设计.我目前正在使用免费设计版式.

运行程序时出现问题.当我最大化窗口时,组件(即文本字段,标签,按钮,选项卡等)不会自行排列.它们保持和我设计的一样小.有时,我设计的组件甚至在运行时甚至都没有出现.

因此,当我运行包含其中组件的程序时,如何首先自动最大化窗口.无论屏幕大小如何,组件都应最大化.

有没有一种方法可以控制NETBeans 6.9.1或更高版本中的这种大小行为.

预先感谢.

I''m developing a small java application but I''m not good at playing around with the user interfaces or layout designs. I''m currently using Free Design layout.

The problem comes when running the program. The components i.e. text fields, labels, buttons, tabs, etc, do not arrange themselves as I maximize the window. They remain as small as I designed them. Sometimes the components that I design do not even appear at run time or appear in half.

So how do I first Auto maximize the window as soon as I run the program including the components in it. The components should be maximized regardless of screen size.

Is there a way to control such a size behavior in NETBeans 6.9.1 or later.

Thanks in advance.

推荐答案

我不太了解NETBean,但是谈论Java时,您可以使用gridBagLayout管理器来实现所需的功能.也许使用NETBeans进行搜索将对您有所帮助.
I don''t know NETBeans very well, but talking about Java you could use a gridBagLayout manager to achieve what you want. Maybe googling this with NETBeans will help you.


您的布局固定.切换到动态布局:

编程动态UI [
You''ve got a fixed layout. Switch to a dynamic layout:

Programming a dynamic UI[^]


这篇关于自动最大化Java NetBeans组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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