Tempo

oi pessoal,

alguem pode me dizer pq essa logica nao ta funcionando, antes funcionava ai fui pegar esses dias pra usar a funcao e nao retorna o tempo atualizando, so o tempo no momento.

public JDateTime(){
	Timer time = new Timer(1000,this);
	time.start();
	//atualiza uma vez
	actionPerformed(null); 
}

private String format(int num){
	format = new DecimalFormat("00");
	return format.format(num);
}

@Override
public void actionPerformed(ActionEvent e) {
	calendar = Calendar.getInstance();
	hour = calendar.get(Calendar.HOUR_OF_DAY);
	minute = calendar.get(Calendar.MINUTE);
	second = calendar.get(Calendar.SECOND);
	format = new DecimalFormat("00");
	
	hourString = Integer.toString(hour);
	minuteString = Integer.toString(minute);
	secondString = Integer.toString(second);
	totalString = (format(hour%12)+":"+format(minute)+":"+format(second));

}

//gets e sets
public String getHour() {
	return hourString;
}

public String getMinute() {
	return minuteString;
}

public String getSecond() {
	return secondString;
}

public String getHourTotal() {
	return totalString;
}