weight

abstract fun SwingModifier.weight(weight: Float, fill: Boolean = true): SwingModifier

Claims weight shares of the height the column has left over once every child that claims none has taken the height it prefers. Two children weighted 1f and 2f take a third and two thirds of it. A child with an explicit maximumSize takes no more than that maximum allows; what it leaves stays empty. With fill the child occupies all the height it is granted; otherwise it occupies as much of that height as it prefers and the column's arrangement places the rest.

Return

this modifier with the height share declared on it.

Parameters

weight

the share claimed, greater than zero

fill

whether the child occupies the whole height it is granted; true by default