//HelloWorld.Java
import java.applet.*;
public class HelloWorld extends Applet{
public void paint(Graphics g){
g.drawString("HelloWorld",25,50);
}
}
編譯後,生成一個HelloWorld.class
然後再把下面這一句放到網友的<BODY>中
<APPLET CODE="HelloWorld.class" width=150 height=200>
</APPLET>
然後再打開網頁就能看見結果"HelloWold"