Appletviewer AppletHelloWorld.java运行小程序对吗?我怎么什么都没有显示啊?

来源:百度知道 编辑:UC知道 时间:2024/06/28 15:45:27
Appletviewer AppletHelloWorld.java运行小程序对吗?我怎么什么都没有显示啊?就是不调用html。
1:Appletviewer AppletHelloWorld.java
2:Appletviewer AppletHelloWorld.class
3:Appletviewer AppletHelloWorld
都试过了,可是要不就是不显示,要不就是错误。这个测试命令怎么用啊?

你需要建立一个html文件来运行小程序
如下
<html>
<head>
<title> A Simple Program</title>
</head>
<body>
<hr/>
<applet code="AppletHelloWorld.class" width=300 height=200>
</applet>
<ht/>
</body>
</html>
保存为 AppletHelloWorld.html

必须保证其与
1:Appletviewer AppletHelloWorld.java
2:Appletviewer AppletHelloWorld.class
这两个文件在同一个文件夹下

然后输入命令:
Appletviewer AppletHelloWorld.html