@Override
	public void mouseReleased(MouseEvent e)
	{
		try
		{
			if (tree.getSelectedSquare() != null && this.clickX != 0xFF)
			{
				int x, y;

				x = ((e.getX() - (lblMap.getWidth() - 32 * map.getWidth()) / 2) / 32);
				y = ((e.getY() - (lblMap.getHeight() - 32 * map.getWidth()) / 2) / 32);

				if (x >= 0 && x < map.getWidth() && y >= 0
				&& y < map.getHeight() && x == this.clickX && y == this.clickY)
				{
					isSaved = false;
					map.setSquare(x, y, tree.getSelectedSquare());
					lblMap.setIcon(printGrid(map.getImage()));
				}
			}
		}
		catch (SpriteException | CompressionException e1)
		{
			e1.printStackTrace();
		}
	}