This is an applet of Diferent Fonts, and colors:
/**
* @(#)FontColor.java 1.0 03/09/15
*
* Felipe Chaves Santos - Digital Solutions
*
*/
import java.applet.*;
import java.awt.*;
public class FontColor extends Applet {
Font f1 = new Font("Helvetica", Font.PLAIN, 18);
Font f2 = new Font("Helvica", Font.BOLD, 10);
Font f3 = new Font("Helvica", Font.ITALIC, 12);
Font f4 = new Font("Currier", Font.PLAIN, 12);
Font f5 = new Font("TimesRoman", Font.BOLD + Font.ITALIC, 14);
Font f6 = new Font("Dialog", Font.ITALIC, 14);
public void paint(Graphics g) {
g.setFont(f1);
g.setColor(Color.blue);
g.drawString("18pt plain Helvetica", 5, 20);
g.setFont(f2);
g.setColor(Color.red);
g.drawString("10pt bold Helvetica", 5, 43);
g.setFont(f3);
g.setColor(Color.black);
g.drawString("12pt italic Helvetica", 5, 58);
g.setFont(f4);
g.setColor(Color.green);
g.drawString("12pt plain Courier", 5, 75);
g.setFont(f5);
g.setColor(Color.lightGray);
g.drawString("14pt bold & italic Times Roman", 5, 92);
g.setFont(f6);
g.setColor(Color.magenta);
g.drawString("14pt italic Dialog", 5, 111);
}
}