TimeLine javafx

I created a timeline that can display a label starting at 10 and should end at 0, but here after a lot of research on the net I'm blocked. How would you pass the label to 0. Thank you in advance ;) There is my counter code :

public void Timer() {
    // evenement pour le compteur 
   Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(1), event -> {        

        getPan().diminuerRect(35);
        getPan().getLab().setText(Integer.toString(a));

        if(a==3) {
            getPan().changeColor();
        }
        a--;

    }));
    timeline.setCycleCount(10);
    a=timeline.getCycleCount();

    timeline.play();

    if(timeline.getCycleCount()==1){
       Timeline timeline0 = new Timeline(new KeyFrame(Duration.seconds(1), event -> {       

            getPan().getLab().setText("0");

        }));
      timeline0.setCycleCount(1);
      timeline0.play();
    }



}