📄 mytimertask.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 + -