سؤال

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

هل كانت مفيدة؟

المحلول

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.

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/

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top