?? multithreadapplet.java
字號(hào):
package birdfly;import java.applet.*;import java.awt.*;/** * <p>Title: 飛行的大鳥(niǎo)</p> * <p>Description: 在沙漠中飛行的大鳥(niǎo)</p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: 北京師范大學(xué)計(jì)算機(jī)系</p> * @author 孫一林 * @version 1.0 */public class MultiThreadApplet extends Applet implements Runnable { Thread thisThread; public void start() { // 重新構(gòu)造start()方法 if ( thisThread == null ) { thisThread = new Thread (this); thisThread.start(); // 啟動(dòng)線程 } } public void stop() { // 重新構(gòu)造stop()方法 if ( thisThread != null ) { // thisThread.stop(); // 停止線程(不建議使用該語(yǔ)句) thisThread = null; } } public void run() { }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -