O'Reilly logo

Java™ How to Program, Seventh Edition by P. J. Deitel - Deitel & Associates, Inc., H. M. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.4. Font Control

This section introduces methods and constants for font control. Most font methods and font constants are part of class Font. Some methods of class Font and class Graphics are summarized in Fig. 12.10.

Figure 12.10. Font-related methods and constants.
Method or constantDescription
Font constants, constructors and methods
public final static int PLAINA constant representing a plain font style.
public final static int BOLDA constant representing a bold font style.
public final static int ITALICA 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()Returns an integer value indicating the current font style. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required