private void animateBar(){
   		for( ActionListener aL : animationTimer.getActionListeners()){
        	animationTimer.removeActionListener(aL);
    	}
		animationTimer.addActionListener(new
        	ActionListener(){
            	public void actionPerformed(ActionEvent event){
            		if(nextValue > currentValue){
						currentValue+=1;
						currentWidth = (int)((double)width * ((double)currentValue/(double)max));
						if(currentValue >= nextValue){
							animationTimer.stop();
							nextValue = currentValue;
						}
					}else{
						currentValue-=1;
						currentWidth = (int)((double)width * ((double)currentValue/(double)max));
						if(currentValue <= nextValue){
							animationTimer.stop();
							nextValue = currentValue;
						}
					}
					repaint();
				}
        });
   		animationTimer.start();
	}