import java.applet.Applet;import java.awt.Graphics;public class MyFirstJavaApplet extends Applet{public void paint(Graphics g){g.drawString("This is my first Java Applet!",15,20);}}不同于javaApp,调试Applet的程序有两种方法,但之前一定要写一个html文件或htm名字任意这里用cndx.htm第一个小应用程序 1是用appletviewer cndx.htm2是在浏览器装了jvm时,双击cndx.htm可以。参考资料:我班的网站http://www.04623.ik8.com