📄 timepanel.java
字号:
package screen;import java.awt.*;import java.util.*;/** * Title: * Description: * Copyright: Copyright (c) 2004 * Company: * @author * @version 1.0 */public class TimePanel extends ShowNumberPanel { BorderLayout borderLayout1 = new BorderLayout(); TimerThread timeThread = null; int second = 0; public TimePanel() { try { jbInit(); } catch(Exception ex) { ex.printStackTrace(); } } public void start() { if (timeThread == null) { timeThread = new TimerThread(this); timeThread.start() ; } else { second = 0; timeThread.resume(); } } public void stop() { if(timeThread!=null) { timeThread.stopThread(); timeThread.suspend(); } second = 0; } public void showSecond() { showNumber(second); second ++; } public void ready() { stop(); showNumber(second); } void jbInit() throws Exception { super.jbInit(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -