e551. the quintessential applet.txt
来自「这里面包含了一百多个JAVA源文件」· 文本 代码 · 共 31 行
TXT
31 行
Every applet must subclass Applet.
import java.applet.*;
import java.awt.*;
public class BasicApplet extends Applet {
// This method is called once by the browser when it starts the applet.
public void init() {
}
// This method is called whenever the page containing this applet is made visible.
public void start() {
}
// This method is called whenever the page containing this applet is not visible.
public void stop() {
}
// This method is called once when the browser destroys this applet.
public void destroy() {
}
// This method is called whenever this applet needs to repaint itself.
public void paint(Graphics g) {
}
}
Here is an example of an HTML file that will cause the browser to load and start the applet:
<applet code=BasicApplet width=100 height=100>
</applet>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?