📄 showtimer.java~4~
字号:
package com.util;
import javax.swing.JLabel;
import java.util.Date;
import java.text.SimpleDateFormat;
public class ShowTimer
implements Runnable {
public ShowTimer() {
}
/**
* run
*
* @todo Implement this java.lang.Runnable method
*/
public void run(javax.swing.JComponent component) {
if (component instanceof JLabel ) {
JLabel label = (JLabel) component;
label.setText("时间:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
}
}
public void run() {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -