public void update() 
	{
		RegularPumpingLemma pl = (RegularPumpingLemma)myLemma;
		stageMessages[0].setText("File loaded.");
		updateTopPane(false);
		
		int[] decomp = pl.getDecomposition();		
        if(decomp[0] == 0 && decomp[1] == 0)        	
            return;
        
        myWDisplay.setText(pl.getW());
        
        setDecomposition(new int[]{pl.getX().length(), pl.getY().length()}, pl.getI());
        decompLabel.setText(myLemma.getDecompositionAsString());                
        
        stages[3].setVisible(true);
        stages[4].setVisible(true);
        
        if (pl.getI() == -1)
        	return;
        
        stages[5].setVisible(true);
        displayIEnd();
        myCanvas.setRestartEnabled(true);
        stageMessages[5].setText("Click \"Restart\" to restart the animation.");
        stageMessages[5].setVisible(true);
	}