|
|
|
|
|
|
FontTestPrerequisitesIn this exercise you will write an applet that displays a list of the current fonts. To get the list of available fonts, ask for the current Toolkit (the class that maps AWT to the underlying native windowing toolkit) via Toolkit.getDefaultToolkit and then ask the toolkit for the font list via getFontList. In this example, you will be drawing in multiple fonts as opposed to building Label objects in multiple fonts. Unlike Label objects, you will need to know how tall letters are in each font, so that you can avoid drawing strings on top of one another.
Perform the following tasks:
Related Exercises
|