bounds

fun SwingModifier.bounds(x: Int, y: Int, width: Int, height: Int): SwingModifier

Sets the component's bounds - its position and size within its parent. Effective in a parent that does not lay its children out (a null layout, or a LayeredPane), where each child positions itself.

Return

this modifier with the bounds declared on it.

Parameters

x

the left edge in pixels, in the parent's coordinate space, whose origin is its top-left corner.

y

the top edge in pixels, measured down from that origin.

width

the width in pixels, measured right from x.

height

the height in pixels, measured down from y.

See also