package exerciseThree;
import exerciseThree.Time5;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;

public class exerciseThree implements ActionListener{
    private Time5 t;
    public exerciseThree() {
		// TODO 自动生成的构造函数存根
    	t=new Time5(12, 34, 59);
	}
	public static void main(String[] args) {
		// TODO 自动生成的方法存根		
        try {
        	exerciseThree ext=new exerciseThree();
            Timer shizhong=new Timer(1000, ext);
            shizhong.start();            
		} catch (Exception e) {
			// TODO: handle exception
			System.out.println(e.toString());
		}
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO 自动生成的方法存根
		t.increaseSecond();
		System.out.println(t.toString());
	}

}
