import java.applet.Applet;                            //引入Java系统类的Applet
import java.awt.Graphics;                            //引入Java 系统类的Graphics
public class Example1_2 extends Applet {               //继承Applet类
    public void paint(Graphics g){ 
        g.drawString("This is a Java Applet!",20,20);     //在界面上坐标为（20,20）的位置输出字符串
    } 
}
