📄 datetime.java
字号:
package com.jlib.client;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateTime extends Thread{
public static String time;
public void run(){
while(true){
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD hh:mm:ss");
time = sdf.format(new Date());
sleep(1000);
com.jlib.client.NormalClientBean.label_3.setText(time);
} catch (InterruptedException e){
// TODO 自动生成 catch 块
e.printStackTrace();
}
}
}
}