开发者

Changing Grid Size in Java

In Swing, using Grid Layout, each gri开发者_开发知识库d has same size..

is it possible to change teh grid size to make them uneven according to need... ??


No.

What you can do, is to nest layouts. For example, if you need to split one cell into a number of chunks. Otherwise you should use some other layout such as the GridBagLayout.


By design gridlayout does all rows/columns the same size. You have to switch to another layout manager to have non-equally sized grids (e.g. GridBagLayout).


No But in my opinion gridlayout is a disaster and shouldn't be used.

If you want to produce some sort of form like layout with different sized columns use the form layout, found here: http://www.jgoodies.com/freeware/forms/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜