不好意思,献丑了,用应用程序可能很简单的吧,小程序太罗嗦了
import java.awt.*;
import java.applet.*;
public class aa extends Applet
{ public void paint(Graphics g)
{ g.setColor(Color.red);
g.fillOval(20,20,80,80);
g.drawOval(20,20,80,80);
g.setColor(Color.yellow);
g.fillOval(60,20,80,80);
g.drawOval(60,20,80,80);
g.setColor(Color.black);
g.fillOval(100,20,80,80);
g.drawOval(100,20,80,80);
g.setColor(Color.green);
g.fillOval(140,20,80,80);
g.drawOval(140,20,80,80);
g.setColor(Color.blue);
g.fillOval(180,20,80,80);
g.drawOval(180,20,80,80);
g.drawString("One World,One Dream",30,120);
g.drawString("同一个世界,同一个梦想",30,140);
}
}
先编译,然后写他的html 代码为
<html>
<head>
<title>mengxiangzhongguo</title>
</head>
<body>
<applet code=aa.class width=400 height=400></applet>
</body>
</html>