[求助]java问题
java文件:
import java.applet.Applet; import java.awt.*; public class SimpleGraphicsInOut extends Applet { Label prompt; TextField input; Label output; public void init() { prompt=new Label("Enter a character please:"); input=new TextField(3); output=new Label(" "); add(prompt); add(input); add(output); } public boolean action(Event e, Object o) { output.setText("You've entered character" + o.toString()); return true; } }
html文件:
<HTML> <APPLET CODE="ZHUTOU.class" WIDTH=300 HEIGHT=500> </APPLET> </HTML>
在dos下输入AppletViewer 可显示结果,但双击html文件不显示结果