item

abstract fun SwingModifier.item(gridx: Int = GridBagConstraints.RELATIVE, gridy: Int = GridBagConstraints.RELATIVE, gridwidth: Int = 1, gridheight: Int = 1, weightx: Double = 0.0, weighty: Double = 0.0, anchor: Int = GridBagConstraints.CENTER, fill: Int = GridBagConstraints.NONE, insets: Insets = DefaultInsets, ipadx: Int = 0, ipady: Int = 0): SwingModifier

Places the child in the cell these constraints describe. The parameters carry GridBagConstraints' own field names and defaults, so a grid-bag layout written against Swing transfers field for field.

Return

this chain with the placement declared on it.

Parameters

gridx

the cell holding the leading edge of the child's display area, the first cell in a row being 0; GridBagConstraints.RELATIVE places the child immediately after the previously declared one

gridy

the cell at the top of the child's display area, the topmost cell being 0; GridBagConstraints.RELATIVE places the child just below the previously declared one

gridwidth

the number of cells the display area spans in its row; GridBagConstraints.REMAINDER spans to the last cell in the row, GridBagConstraints.RELATIVE to the next to last

gridheight

the number of cells the display area spans in its column; GridBagConstraints.REMAINDER spans to the last cell in the column, GridBagConstraints.RELATIVE to the next to last

weightx

the share of extra horizontal space this child's column claims; a column of weight 0.0 receives none

weighty

the share of extra vertical space this child's row claims; a row of weight 0.0 receives none

anchor

where the child sits within its display area when the area is larger

fill

whether and along which axes the child is resized to fill its display area

insets

the external padding - the room held clear around the child inside its display area

ipadx

the internal horizontal padding: the child is at least its minimum width plus this many pixels wide

ipady

the internal vertical padding: the child is at least its minimum height plus this many pixels tall

See also