public void animateToSize(int x, int y) {
		
		int currentX = getWidth();
		int currentY = getHeight();
		int dx = x - currentX;
		int dy = y - currentY;
		int ppsX = dx / 20;
		int ppsY = dy / 20;
		
		int i = currentX;
		int j = currentY;
		
		for (int c = 0; c < 20; c ++) {
			i += ppsX;
			j += ppsY;
			
			if (x != currentX && ppsX != 0) {
				if ((x - i) / ppsX <= 1 && (x - i) / -ppsX <= 1)
					i = x;
			}
			if (y != currentY && ppsY != 0) {
				if ((y - j) / ppsY <= 1 && (y - j) / -ppsY <= 1)
					j = y;
			}
			
			setSize(i, j);
		}
	}