public void createGrid()
	{
		this.area = new Dimension(0, 0);
		this.showCenter = true;

		boolean changed = false;
		int dist;
		if (TILE_COUNT_WIDTH >= TILE_COUNT_HEIGHT)
		{
			dist = TILE_COUNT_WIDTH;
		}
		else
		{
			dist = TILE_COUNT_HEIGHT;
		}
		for (int x = 0; x < TILE_COUNT_WIDTH; x++)
		{
			for (int y = 0; y < TILE_COUNT_HEIGHT; y++)
			{
				this.grid[x][y] = new Tile(true);
				// Top point 0
				this.grid[x][y].addPoint(TILE_SIZE.x * (dist - y + x) + startX,
						TILE_SIZE.y * (y + x) + startY);
				// Left point 1
				this.grid[x][y].addPoint(TILE_SIZE.x * (dist - y - 1 + x)
						+ startX, TILE_SIZE.y * (y + 1 + x) + startY);
				// Bottom point 2
				this.grid[x][y].addPoint(TILE_SIZE.x * (dist - y + x) + startX,
						TILE_SIZE.y * (y + 2 + x) + startY);
				// Right point 3
				this.grid[x][y].addPoint(TILE_SIZE.x * (dist - y + 1 + x)
						+ startX, TILE_SIZE.y * (y + 1 + x) + startY);
			}
		}
		for (int i = 0; i < TILE_COUNT_WIDTH - 1; i++)
		{
			Point start = new Point(grid[i + 1][0].xpoints[0],
					grid[i + 1][0].ypoints[0]);
			Point end = new Point(
					grid[i + 1][TILE_COUNT_HEIGHT - 1].xpoints[1],
					grid[i + 1][TILE_COUNT_HEIGHT - 1].ypoints[1]);
			this.verLines[i] = new Line2D.Double(start, end);
		}
		for (int i = 0; i < TILE_COUNT_HEIGHT - 1; i++)
		{
			Point start = new Point(grid[0][i + 1].xpoints[0],
					grid[0][i + 1].ypoints[0]);
			Point end = new Point(grid[TILE_COUNT_WIDTH - 1][i + 1].xpoints[3],
					grid[TILE_COUNT_WIDTH - 1][i + 1].ypoints[3]);
			this.horLines[i] = new Line2D.Double(start, end);
		}
		this.gridBoundary.addPoint(TILE_SIZE.x * dist + startX, startY);
		this.gridBoundary.addPoint(TILE_SIZE.x * (dist - TILE_COUNT_HEIGHT)
				+ startX, TILE_SIZE.y * TILE_COUNT_HEIGHT + startY);
		this.gridBoundary.addPoint(TILE_SIZE.x
				* (dist - (TILE_COUNT_HEIGHT - 1) + (TILE_COUNT_WIDTH - 1))
				+ startX, TILE_SIZE.y * (TILE_COUNT_WIDTH + TILE_COUNT_HEIGHT)
				+ startY);
		this.gridBoundary.addPoint(TILE_SIZE.x * (dist + TILE_COUNT_WIDTH)
				+ startX, TILE_SIZE.y * TILE_COUNT_WIDTH + startY);

		int current_width = (startX * 2 + TILE_SIZE.x * (dist * 2));
		if (current_width > area.width)
		{
			area.width = current_width;
			changed = true;
		}

		int current_height = (startY * 2 + TILE_SIZE.y * (dist * 2));
		if (current_height > area.height)
		{
			area.height = current_height;
			changed = true;
		}

		if (changed)
		{
			mapView.setPreferredSize(area);
			mapView.revalidate();
		}
		mapView.repaint();
	}