public int charArea(char ch) {
		
		int X = grid.length;
		int Y = grid[0].length;
		int maxX = 0;
		int maxY = 0;
		int minX = 1000;
		int minY = 1000;
		boolean found = false;
		for (int i = 0; i < X; i++)
			for (int j = 0; j < Y; j++)
				if (grid[i][j] == ch) {
					found = true;
					if (i > maxX)
						maxX = i;
					if (j > maxY)
						maxY = j;
					if (i < minX)
						minX = i;
					if (j < minY)
						minY = j;
				}
		if (found)
			return (maxX - minX + 1)*(maxY-minY + 1);
		return 0;
	}