Question

In Swing, using Grid Layout, each grid has same size..

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

Was it helpful?

Solution

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).

OTHER TIPS

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.

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/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top