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

📄 clock.java

📁 好的超市源码供大家下载
💻 JAVA
字号:
package view.com.systime;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Timer;

/**
 * 获得活动时钟对象
 * @author linfeng
 *
 */
public class Clock extends StillClock implements ActionListener{
  
  /**
   * 创建一个timer对象
   */
  protected Timer timer = new Timer(1000,this);
  
  /**
   * 定时器开始
   */
  public Clock(){
    timer.start();
  }
  
  /**
   * 设定定时器新的时间,并重新画在屏幕上
   */
  public void actionPerformed(ActionEvent e){
    setCurrentTime();
    repaint();
  }
} 

⌨️ 快捷键说明

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