【说明】
下面是一个Applet程序,程序的功能是在显示面板上输出字符串。当html页面被其他窗口遮挡后再次显示时,请给出输出结果。
import java.awt.*;
import java. (1) . *;
public class MyApplet (2) Applet
public void (3) (Graphics g)
g.drawString(tip,20,40);
tip ="I am Java Applet";
public void init()
tip ="welcome";
private (4) tip;
<html>
<head>
<title> A Simple Applet </title>
</head>
<body>
<applet code="MyApplet.class" width=800 height=400>
</applet>
</body>
</html>
网页输出 (5)