Miglayout question: column restrictions

I have a miglayout for a window where one of the columns was specified as grow, but I need to change it, so it basically means "grow but limited to ___ pixels".

Is there any way to do this?

+3
source share
1 answer

It is doable. Just set the maximum size for the column. In the following example

setLayout(
   new MigLayout(
      "", 
      "[89px][:89px:250px,grow][89px,grow]", 
      "[23px][23px][23px]"));

the second column has a preferred size of 89 pixels and a maximum size of 250 pixels. It will stop growing at around 250. The third column will continue to grow.

+5
source

Source: https://habr.com/ru/post/1755043/


All Articles