初始化的时候Applet会被调用在内存中,只要不去手工中断或关闭浏览器,这个Applet会一直持续在内存中,哪怕你到别的页面转了一圈。简单的说,init()方法类似main(),是启动的applet的开始。总不能说因为main()方法的事情都可以由别的方法完成就不去用main()?
解决方案 »
- 求一 BestMail 的jar包 非常感谢
- 编译MyInput遇到错误!请求高手!
- 我的添加程序出错了,请各位请教,我是新手。
- System.out.println(6^3)
- HttpURLConnection / URLConnection 传输大文件数据错误问题,请大虾指教
- 绘图的问题,请高手帮助解决! 先谢谢了
- Java连接MySql,晕ing,多谢
- 抽象类的方法必须被子类继承吗
- 我看了半天的接口,还是没有搞懂通过接口来实现多生继承的???
- Unsupported major.minor version 52.0
- 介绍几个新闻组吧?同志们
- 谁用过borland enterprise server?
1. init()
2. start()
3. stop()
4. destroy()
are called by the browser at various times.init() is, in some sense, like a constructor, and is called when the applet is first loaded. start() is called when the browser starts the applet's execution when the page is first loaded or revisited.stop() is called when the browser stops the execution of the applet. For example, when the user leaves the page or closes the browser.destory() is, in some sense, like a destrutor and called when the applet is unloaded.
init()初始化一次