1import java.awt.*;
2import java.applet.*;
3
4public class font extends Applet
5 {
6 Font f1,f2,f3;
7
8 public void init()
9 {
10 f1 = new Font("Arial",Font.BOLD,18);
11 f2 = new Font("Forte",Font.PLAIN,24);
12 f3 = new Font("Elephant",Font.ITALIC,28);
13 }
14
15 public void paint(Graphics g)
16 {
17 g.drawString("Senthil",50,50);
18
19 g.setFont(f1);
20 g.drawString("Velan",50,80);
21
22 g.setFont(f2);
23 g.drawString("Vicky",50,110);
24
25 g.setFont(f3);
26 g.drawString("Vignesh",50,140);
27 }
28 }
29
30/* <applet code = "fon.class" height = 500 width =500>
31 </applet> */