Applet调用

package cn.cjxo.applet;
import java.applet.Applet;
import java.awt.Graphics;
public class MyApplet extends Applet {
	@Override
	public void paint(Graphics g) {
		g.drawString("Hello, world!", 100, 50);
	} 
}

MyApplet打包s.jar之后调用
<applet code="cn.cjxo.applet.MyApplet" width="500px" height="500px" codebase="." archive="s.jar">
</applet>


<object   classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"   
  codeBase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"   
  width="500px"
  height="500px">   
  <param   name="code"   value="cn.cjxo.applet.MyApplet.class">   
  <param   name="archive"   value="s.jar"   >   
  <param   name="codebase"   VALUE=".">   
</object>

<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width=600 
      height=400 
      archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
               http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl.all.jar,
               http://download.java.net/media/jogl/jsr-231-2.x-webstart/nativewindow.all.jar,
               http://download.java.net/media/gluegen/webstart-2.x/gluegen-rt.jar,
               http://download.java.net/media/jogl/jsr-231-2.x-demos-webstart/jogl-demos.jar"> 
   <param name="codebase_lookup" value="false"> 
   <param name="subapplet.classname" value="demos.applets.GearsApplet"> 
   <param name="subapplet.displayname" value="JOGL Gears Applet"> 
   <param name="noddraw.check" value="true"> 
   <param name="progressbar" value="true"> 
   <param name="jnlpNumExtensions" value="1"> 
   <param name="jnlpExtension1"
          value="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-core.jnlp"> 
</applet>

你可能感兴趣的:(java,html)