如何在网页中插入Java小程序?
3个回答
展开全部
你指的是applet?
1。在html中嵌入:
<applet code="XX.class" width="350" height="350">
Java applet that draws animated bubbles.
</applet>
2.编写applet的java程序,如
1.import java.awt.*;
2.import java.applet.*;
3.
4.public class XX extends Applet {
5.
6.public void paint(Graphics g){
7.g.drawString("Hello World!", 25, 25);
8.}
9.}
1。在html中嵌入:
<applet code="XX.class" width="350" height="350">
Java applet that draws animated bubbles.
</applet>
2.编写applet的java程序,如
1.import java.awt.*;
2.import java.applet.*;
3.
4.public class XX extends Applet {
5.
6.public void paint(Graphics g){
7.g.drawString("Hello World!", 25, 25);
8.}
9.}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询