主题:我刚开始上java课.怎么把下面的Applet嵌入到网页啊?
import java.awt.Graphics;
import java.applet.Applet;
public class HelloApplet extends Applet //第一个Applet哦!
{
public void paint(Graphics g)
{
g.drawString("Hello world",20,20);
}
}
我给它来个
<html>
<head>
<title>一定要成功啊!第一个Applet</title>
</head>
<body>
<applet>
import java.awt.Graphics;
import java.applet.Applet;
public class HelloApplet extends Applet //第一个Applet哦!
{
public void paint(Graphics g)
{
g.drawString("Hello world",20,20);
}
}
</applet>
</body>
< ml>
怎么不能显示啊?
import java.applet.Applet;
public class HelloApplet extends Applet //第一个Applet哦!
{
public void paint(Graphics g)
{
g.drawString("Hello world",20,20);
}
}
我给它来个
<html>
<head>
<title>一定要成功啊!第一个Applet</title>
</head>
<body>
<applet>
import java.awt.Graphics;
import java.applet.Applet;
public class HelloApplet extends Applet //第一个Applet哦!
{
public void paint(Graphics g)
{
g.drawString("Hello world",20,20);
}
}
</applet>
</body>
< ml>
怎么不能显示啊?