Using font: – Java provide facility to use multiple font style of text font with the font class. Using this class, we can select a font, set its size, and specifies whether it is bold, italic and so on. We will find the fields using font class.
Font class is used to change font style, font size and shown own the screen. We will let the user type character and display them in multiple font using applet, by determining the screen size of the text using the FontMatrics class string width getheight() method. We will also let the user specify the size of the text, as well as whether it should be in italic, bold, and set font object accordingly only those fonts can be selected which are set in our system.