Share via


Overview | Methods | Fields | This Package | All Packages

OverviewMethodsFieldsThis PackageAll Packages

Control.getFont

Retrieves the current font for this control, which is the font the control uses to draw its text.

Syntax

public Font getFont()

Return Value

Returns a Font object that represents the font used to draw text in this control. Returns the font for the control's parent if no font has been explicitly set for this control. Returns the default graphical user interface (GUI) font if no font has been explicitly set for this control or for this control's parent.

Remarks

This is an ambient property and will always return a non-null value.

See Also   setFont