SystemFonts

Inheritance: java.lang.Object

public final class SystemFonts

Specifies the fonts used to display text in Windows display elements.

Methods

MethodDescription
getCaptionFont()Gets a Font that is used to display text in the title bars of windows.
getSmallCaptionFont()Gets a Font that is used to display text in the title bars of small windows, such as tool windows.
getMenuFont()Gets a Font that is used for menus.
getStatusFont()Gets a Font that is used to display text in the status bar.
getMessageBoxFont()Gets a Font that is used for message boxes.
getIconTitleFont()Gets a Font that is used for icon titles.
getDefaultFont()Gets the default font that applications can use for dialog boxes and forms.
getDefaultImageFont()Gets the default font that applications can use for dialog boxes and forms.
getDialogFont()Gets a font that applications can use for dialog boxes and forms.
getFontByName(String systemFontName)Returns a font object that corresponds to the specified system font name.

getCaptionFont()

public static Font getCaptionFont()

Gets a Font that is used to display text in the title bars of windows.

Returns: Font - a Font that is used to display text in the title bars of windows.

getSmallCaptionFont()

public static Font getSmallCaptionFont()

Gets a Font that is used to display text in the title bars of small windows, such as tool windows.

Returns: Font - a Font that is used to display text in the title bars of small windows, such as tool windows.

getMenuFont()

public static Font getMenuFont()

Gets a Font that is used for menus.

Returns: Font - a Font that is used for menus.

getStatusFont()

public static Font getStatusFont()

Gets a Font that is used to display text in the status bar.

Returns: Font - a Font that is used to display text in the status bar.

getMessageBoxFont()

public static Font getMessageBoxFont()

Gets a Font that is used for message boxes.

Returns: Font - a Font that is used for message boxes.

getIconTitleFont()

public static Font getIconTitleFont()

Gets a Font that is used for icon titles.

Returns: Font - a Font that is used for icon titles.

getDefaultFont()

public static Font getDefaultFont()

Gets the default font that applications can use for dialog boxes and forms.

Returns: Font - The default Font of the system. The value returned will vary depending on the user’s operating system and the local culture setting of their system.

getDefaultImageFont()

public static Font getDefaultImageFont()

Gets the default font that applications can use for dialog boxes and forms.

Returns: Font - The default Font of the system. The value returned will vary depending on the user’s operating system and the local culture setting of their system.

getDialogFont()

public static Font getDialogFont()

Gets a font that applications can use for dialog boxes and forms.

Returns: Font - A Font that can be used for dialog boxes and forms, depending on the operating system and local culture setting of the system.

getFontByName(String systemFontName)

public static Font getFontByName(String systemFontName)

Returns a font object that corresponds to the specified system font name.

Parameters:

ParameterTypeDescription
systemFontNamejava.lang.StringThe name of the system font you need a font object for.

Returns: Font - A Font if the specified name matches a value in SystemFonts; otherwise, null.