package demo.others;
public class AppletDemo {
/**
* Called by the browser or applet viewer to inform this applet that it has
* been loaded into the system. It is always called before the first time
* that the <code>start</code> method is called.
* <p>
* A subclass of <code>Applet</code> should override this method if it has
* initialization to perform. For example, an applet with threads would use
* the <code>init</code> method to create the threads and the
* <code>destroy</code> method to kill them.
* <p>
* The implementation of this method provided by the <code>Applet</code>
* class does nothing.
* 补充:JVM加载applet类,浏览器创建applet,浏览器调用init方法进行初始化,如果Applet的子
* 类具有初始化操作应覆盖此方法。通常,该方法实现的功能包括创建用户界面组件、装载图像和音频等资源
* 以及从HTML网页的<applet>标记中获取参数
*/
public void init() {
}
/**
* Called by the browser or applet viewer to inform this applet that it
* should start its execution. It is called after the <code>init</code>
* method and each time the applet is revisited in a Web page.
* <p>
* A subclass of <code>Applet</code> should override this method if it has
* any operation that it wants to perform each time the Web page containing
* it is visited. For example, an applet with animation might want to use
* the <code>start</code> method to resume animation, and the
* <code>stop</code> method to suspend the animation.
* <p>
* Note: some methods, such as <code>getLocationOnScreen</code>, can only
* provide meaningful results if the applet is showing. Because
* <code>isShowing</code> returns <code>false</code> when the applet's
* <code>start</code> is first called, methods requiring
* <code>isShowing</code> to return <code>true</code> should be called from
* a <code>ComponentListener</code>.
* <p>
* The implementation of this method provided by the <code>Applet</code>
* class does nothing.
* 补充:init方法完成后,调用start方法,浏览过别的网页之后回来也调用此方法
*/
public void start() {
}
/**
* Called by the browser or applet viewer to inform this applet that it
* should stop its execution. It is called when the Web page that contains
* this applet has been replaced by another page, and also just before the
* applet is to be destroyed.
* <p>
* A subclass of <code>Applet</code> should override this method if it has
* any operation that it wants to perform each time the Web page containing
* it is no longer visible. For example, an applet with animation might want
* to use the <code>start</code> method to resume animation, and the
* <code>stop</code> method to suspend the animation.
* <p>
* The implementation of this method provided by the <code>Applet</code>
* class does nothing.
* 补充:离开页面时调用stop方法
*/
public void stop() {
}
/**
* Called by the browser or applet viewer to inform this applet that it is
* being reclaimed and that it should destroy any resources that it has
* allocated. The <code>stop</code> method will always be called before
* <code>destroy</code>.
* <p>
* A subclass of <code>Applet</code> should override this method if it has
* any operation that it wants to perform before it is destroyed. For
* example, an applet with threads would use the <code>init</code> method to
* create the threads and the <code>destroy</code> method to kill them.
* <p>
* The implementation of this method provided by the <code>Applet</code>
* class does nothing.
*/
public void destroy() {
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
这是java常用类解析系列博客中的示例代码及自己写的工具类,代码注释详细,博客地址:http://blog.csdn.net/touch_2011/article/details/6860043 主要讲解了System类、Object类、Arrays类、Cloneable接口、IO系统输入输出类及装饰类、IO系统文本读写工具类、IO系统二进制读写工具类、对象序列化工具类、File类及文件搜索工具类、java异常机制及自定义异常类、字符串与格式化输出、Applet(JApplet)详解及示例、Date类和Calendar类示例、Random类(Math.random())生成指定范围的随机数或字符
资源推荐
资源详情
资源评论
收起资源包目录
src.zip (43个子文件)
src
http
PassWord.java 868B
Test.java 3KB
MyJApplet.class 1019B
showMyJapplet.html 358B
demo
others
AppletDemo.java 4KB
ArraysDemo.java 1009B
DateDemo.java 525B
Test.java 192B
MyJApplet.class 1KB
FormatterDemo.java 948B
MyJApplet.java 931B
DeepCloneDemo.java 2KB
SystemDemo.java 1KB
CalendarDemo.java 2KB
ObjectDemo.java 546B
io
DataInputStreamDemo.java 2KB
DataInputStreamAndByteArrayInputStreamDemo.java 530B
RandomAccessFileDemo.java 992B
PrintWriterDemo.java 666B
FileInputStreamDemo.java 1KB
FileReaderAndBufferedReaderDemo.java 1KB
ObjectInputStreamDemo.java 2KB
ByteArrayInputStreamDemo.java 1KB
StringReaderDemo.java 399B
PrintStreamDemo.java 685B
FileDemo.java 2KB
exception
ExceptionDemo1.java 1KB
ExceptionDemo3.java 371B
ExceptionDemo2.java 844B
mine
util
others
TestHex.java 351B
Hex.java 475B
TestGetRandom.java 502B
GetRandom.java 709B
io
TestSearchFile.java 844B
BinaryFile.java 1KB
TestObjectFile.java 862B
ObjectFile.java 2KB
TestBinaryFile.java 347B
TextFile.java 1KB
SearchFile.java 2KB
TestTextFile.java 338B
exception
MyException.java 496B
string
MyJApplet.java 891B
共 43 条
- 1
资源评论
一个程序写手
- 粉丝: 440
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功