⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mytimertask.java

📁 Huffman编码的java实现。含实验报告。
💻 JAVA
字号:
package gilyou;
import java.util.TimerTask;

public class MyTimerTask extends TimerTask {
    public boolean done = false;
    public String message = null;
    String tip = null;
	public MyTimerTask(String tip){
		super();
		this.tip = tip;
	}
	public void run(){
		try{
			Main.infoTextArea.setText("\n\n\n\t\t" + tip + " . . . . . .");
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
			Thread.sleep(500);
			Main.infoTextArea.setText("\n\n\n\t\t" + tip + " .");
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
			Thread.sleep(500);
			Main.infoTextArea.setText("\n\n\n\t\t" + tip + " . .");
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
			Thread.sleep(500);
			Main.infoTextArea.setText("\n\n\n\t\t" + tip + " . . .");
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
			Thread.sleep(500); 
			Main.infoTextArea.setText("\n\n\n\t\t" + tip + " . . . .");
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
			Thread.sleep(500);
			Main.infoTextArea.setText("\n\n\n\t\t" + tip + " . . . . .");
			if(done){
				this.cancel();
				Main.infoTextArea.setText(message);
			}
		}catch(Exception e){
			e.printStackTrace();
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -