public void setCursor(int mode, boolean animate) {
		//System.out.println("Set cursor: "+mode+" animate: "+animate);
		Toolkit toolkit = Toolkit.getDefaultToolkit();
		
		Image newCursor = null;
		switch(mode){
		case CURSOR_HAND:
			newCursor = toolkit.getImage(getClass().getResource("resources/hand.png"));
			break;
		case CURSOR_HOLDING:
			newCursor = toolkit.getImage(getClass().getResource("resources/handDown.png"));
			break;
		case CURSOR_HAMMER:
			newCursor = toolkit.getImage(getClass().getResource("resources/hammer.png"));
			break;
		}
		
		if (newCursor== null){
			System.err.println("ERROR: Cursor value passed to setCursor was not a valid selection.");
			return;
		}
		
		Cursor c = toolkit.createCustomCursor(newCursor, new Point(drawPanel.getX(),
				drawPanel.getY()), "img");
		

		
		if (animate){
			ActionListener returnToHand = new ActionListener(){
				  public void actionPerformed(ActionEvent event){
				    //System.out.println("hello");
					  setCursor(UINew.CURSOR_HAND,false); //do not wait when resetting the hand
				  }
				};
				Timer timer = new Timer(120, returnToHand); //set time value and callback listener
				timer.setRepeats(false); //don't do over and over
				timer.start(); //start the timer asynchronously
		}
		drawPanel.setCursor(c);
	}