criei a seguinte programação
public void atualiza_tempo() {
try
{
segundo = segundo + 1;
if( segundo > 59 ){
segundo = 00;
minuto = minuto+1;
}
if( minuto == 59 ){
minuto = 00;
hora = hora+1;
}
Label buttonLabel = new Label( "VALOR" + completaComZero(hora) + ":" + completaComZero(minuto) + ":" + completaComZero(segundo) );
fSecundario.addComponent(buttonLabel);
fSecundario.refreshTheme();
Thread.sleep(1000);
fSecundario.removeComponent(buttonLabel);
atualiza_tempo();
}
catch(InterruptedException i)
{
}
}
E na hora de chamar ela
public void executa_pergunta()
{
Display.init(this);
try{
Resources res = Resources.open("/imagens/rec.res");
UIManager.getInstance().setThemeProps(res.getTheme(res.getThemeResourceNames()[0]));
}catch(IOException ex4){
}
fSecundario = new Form();
execute(fSecundario);
voltar = new Command("Avançar");
sair = new Command("Sair");
fSecundario.addCommand(voltar);
fSecundario.addCommand(sair);
fSecundario.setCommandListener(this);
fSecundario.setTransitionOutAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, false, 500));
atualiza_tempo();
fSecundario.show();
}
Ao invés de ele ficar exibindo o label de 1 em 1 segundo atualizado ele simplemente trava o APP
Alguém podia me ajudar ?
O que preciso é informar a pessoa o tempo que ela ta usando o sistema 00:00:00 …
Grato
Rodrigo