border

Sets the component's border. null removes it.

Keep the border instance stable by creating it outside the style: borders compare by identity, so one built inside the style is a new border on every run. The last border declaration wins across border, lineBorder and emptyBorder. A style that stops setting a border restores the component's previous border.

A standard component other than a panel or label may draw over or ignore this border. For such a component, set the border on a surrounding panel.

Parameters

border

the border around the content. Its insets reduce the space available for the content.

See also