The code below will draw some text on the applet window. To set a font we must set font face, style (BOLD, PLAIN, ITALIC) and a size.

Note : there is a new color mixed - See Chart for further colors

import java.applet.*;
import java.awt.*;


public class test extends Applet
 {

	 public void init()
	  {setSize(800,600);
                   }

	 public void paint (Graphics g)
	   { Font one = new Font("Monotype Corsiva",Font.BOLD, 24);
	       g.setColor(new Color(0,0,255));
	       g.setFont(one);
	       g.drawString("Hello world",100,100);
	   			 

	   }
   }