icon

Sets the icon a component displays beside its text; null displays none.

Applies to labels and to every kind of button.

A look and feel may derive other properties from the icon; removing the declaration restores the icon, not what was derived from it.

Return

this modifier with the icon declared on it.

Parameters

icon

the icon drawn beside the text; its size counts toward the component's preferred size, so swapping in a differently sized one re-lays the component out.

See also