public void update(){
        if (remainingTime == 0) {
            this.frame.getPanPara().getButPause().setVisible(false);
            this.frame.getPanPara().getButGeneration().setVisible(true);
            this.frame.getPanPara().getTfStep().setEnabled(true);
            this.frame.getPanPara().getTfStepNumber().setEnabled(true);
            this.frame.getPanPara().getSlStepSpeed().setEnabled(true);
            this.frame.getPanPara().getSliderNumber().setEnabled(true);
            this.frame.getPanPara().getButStepValid().setVisible(true);
            this.frame.getPanPara().getButStepValid().setEnabled(true);
            
            this.frame.getPanPara().getCbFireMode().setVisible(false);
            this.frame.getPanPara().getCbInvasionMode().setVisible(false);
            
            this.frame.getPanMenu().getInfectItem().setEnabled(false);
            this.frame.getPanMenu().getFireItem().setEnabled(false);
            
            this.frame.getPanPara().getRadioPanel().setVisible(false);
            if (!(BOLObj.getTab().getX() > 49 && BOLObj.getTab().getY() > 49)) {
                this.frame.getPanPara().getButGeneration().setEnabled(false);
            }
            if (!(BOLObj.getTab().getX() > 49 && BOLObj.getTab().getY() > 49)) {
                this.frame.getPanPara().getButNext().setEnabled(false);
            }
            this.frame.getPanProgBar().setProgressNumber(0);

            this.frame.getPanMenu().getGeneItem().setEnabled(false);
            this.frame.getPanMenu().getPlayItem().setEnabled(false);
            this.frame.getPanMenu().getPauseItem().setEnabled(false);
            
            remainingTime = 0;
            this.actualStepNumber = 0;
            timer.stop();
        } else {
            this.frame.setTabToShow(this.BOLObj.getUpdatedTab().getTab(), this.BOLObj.getUpdatedTab().getX(), this.BOLObj.getUpdatedTab().getY());
            BOLObj.setTab(frame.getTabToShow(), frame.getGridWidth(), frame.getGridLength());
            BOLObj.CheckTab();
            this.frame.getPanGraphic().repaint();
            this.updateBOLObject(BOLObj);

            this.frame.getPanProgBar().setProgressNumber((int)(((double)actualStepNumber * 100.0)/(stepNumber/+ 1)));
            HashMap countResult = BOLObj.getCaseCounter().CountStateGridCase(BOLObj, frame);

            int nbMaxTabCase = BOLObj.getTab().getX()* BOLObj.getTab().getY();
            DecimalFormat df = new DecimalFormat("#.###");

            this.frame.getPanText().setNbStep("Tour : " + (actualStepNumber) + "/" + stepNumber);
            String a = df.format((double)Integer.valueOf(countResult.get(Etat.jeunePousse).toString())/(double)nbMaxTabCase);
            this.frame.getPanText().setNbJeunePousse("JP : " + a);
            String b = df.format((double)Integer.valueOf(countResult.get(Etat.arbuste).toString())/(double)nbMaxTabCase);
            this.frame.getPanText().setNbArbuste("Arbu. : " + b);
            String c = df.format((double)Integer.valueOf(countResult.get(Etat.arbre).toString())/(double)nbMaxTabCase);
            this.frame.getPanText().setNbArbre("Arbre : " + c);
            
            if (this.frame.getPanText().getNbFeu().isEnabled()) {
                this.frame.getPanText().setNbFeu("Feu : " + df.format((double)Integer.valueOf(countResult.get(Etat.feu).toString())/(double)nbMaxTabCase));
            }
            
            if (this.frame.getPanText().getNbInfecte().isEnabled()) {
                this.frame.getPanText().setNbInfecte("Inf. : " + df.format((double)Integer.valueOf(countResult.get(Etat.infecte).toString())/(double)nbMaxTabCase));
            }

            String[] csvSave = {a, b, c, df.format((double)Integer.valueOf(countResult.get(Etat.vide).toString())/(double)nbMaxTabCase)};
            this.BOLObj.getCountStateGridCase().add(csvSave);

            this.frame.getPanText().repaint();
            
            int now = this.actualStepNumber++;
            int elapsed = now - lastUpdate;
            remainingTime -= elapsed;
            lastUpdate = now;
        }
    }