Java supports nine logical font names:
The font name is entered as the first argument of the font constructor
method:
Font one = new Font("Courier", Font.PLAIN, 18);
EXAMPLE: This applet is an approximation of what the student will be expected to create. No code will be offered since the student will need to experiment with the use of the setFont method and the font class constructor in order to successfully complete this activity. |
x |
ASSIGNMENT:
You will recreate the applet shown on this page. When you view your applet
using appletviewer, the differences between the fonts may not be displayed.
So, you may want to view your applet using Netscape. You will need to create
a web page in order to do this. Here's the code for a simple web page which
displays an applet (named fonts.class).