27.4 Manipulating Fonts
This section introduces methods and constants for manipulating fonts. Most font methods and font constants are part of class Font
. Some constructors, methods and constants of class Font
and class Graphics
are summarized in Fig. 27.10.
Fig. 27.10 Font
-related methods and constants.
Method or constant | Description |
---|---|
Font constants, constructors and methods |
|
public static final int PLAIN |
A constant representing a plain font style. |
public static final int BOLD |
A constant representing a bold font style. |
public static final int ITALIC |
A constant representing an italic font style. |
public Font(String name, int style, int size) |
Creates a Font object with the specified font name, style and size. |
public int getStyle() ... |
Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.