简体   繁体   English

无法从appletviewer显示小程序

[英]Applet not displaying from appletviewer

When i run the Main00App.java from appletviewer i have Start: applet not initiated . 当我从appletviewer运行Main00App.java时 ,我已经开始了:applet未启动 The commented html is read because i can resize the window using the width and height. 阅读注释的html,因为我可以使用宽度和高度调整窗口大小。

import java.awt.*;
import java.applet.*;

/*
<applet code="Main00App.class" width=200 height=150>
</applet>
*/

public class Main00App extends Applet {

public void paint(Graphics g) {
    g.drawString("Java applet", 10, 20);
}

}

I think so that you need to run following program by command line using the applet viewer: 我认为您需要使用applet查看器通过命令行运行以下程序:

appletviewer Main00App.java 

I had run the following program. 我已经运行了以下程序。 It works for me. 这个对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM