The Quintessential Applet
上一篇 /
下一篇 2008-05-17 10:32:09
/ 个人分类:java
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>
相关阅读:
- 展望Java开发:把握现在,把握未来 (joejoe0332, 2008-4-06)
- PHP语言教父炮轰Java:已输掉Web之战 (joejoe0332, 2008-4-15)
- eclipse显示行数,增加调试便利 (一免, 2008-4-30)
- JavaOne 2008开幕 开源携Java推动创新 (joejoe0332, 2008-5-06)
- JavaOne2008开幕Sun拓展开源新模式 (joejoe0332, 2008-5-06)
- Sun携亚马逊和索尼爱立信展示Java创新 (joejoe0332, 2008-5-07)
- 甲骨文JavaOne上推Eclipse企业软件包 (joejoe0332, 2008-5-13)
- Spring Framework 【Java开源JEE框架】 (nuodi9988, 2008-5-17)
- Compiere ERP&CRM 【Java开源ERP与CRM系统】 (nuodi9988, 2008-5-17)
- Java Database Programming Example Code (nuodi9988, 2008-5-17)
导入论坛
收藏
分享给好友
管理
举报
TAG:
The
Quintessential
Applet
java