Gostaria que quanto o tempo ficasse em zero esta thread para-se.
so que não estou conseguindo.
[code]public void contagemRegresiva(final int segundos) {
Timer timer = null;
ActionListener actionListener = new ActionListener() {
int segundo = segundos;
@Override
public void actionPerformed(ActionEvent e) {
segundo--;
lblRelogio.setText("" + segundo);
if (segundo == 0) {
//parar a thread timer
}
}
};
timer = new Timer(1000, actionListener);
timer.start();
}[/code]