@Override
	protected void paintComponent(Graphics g1) {
		super.paintComponent(g1);
		Graphics2D g = (Graphics2D) g1;
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);
		g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
				RenderingHints.VALUE_INTERPOLATION_BILINEAR);

		if (getHistoryItems().isEmpty())
			return;

		HistoryItem currentItem = getHistoryItems().get(currentIndex);

		int valueAmount = currentItem.values.length;
		int width = getWidth();
		int height = getHeight();
		int i = 0;
		int diff = width / 2 / valueAmount;
		for (int value : currentItem.values) {
			BufferedImage cardImage;
			if (value < 0 || value > cardImages.length) {
				cardImage = this.awesomeImage;
			} else {
				cardImage = cardImages[value];
			}

			int x = (width / 4) + (i * diff) - cardImage.getWidth() / 8;
			int y = height / 2 - cardImage.getHeight() / 2 / 2;
			int imgWidth = cardImage.getWidth() / 2;
			int imgHeight = cardImage.getHeight() / 2;

			g.setStroke(new BasicStroke(3));

			for(int cardIndex = 0; cardIndex < currentItem.index.length; cardIndex++) {
				if (i == currentItem.index[cardIndex])
					g.drawRect(x, y, imgWidth, imgHeight);
			}

			g.drawImage(cardImage, x, y, imgWidth, imgHeight, null);
			i++;
		}
		if (currentIndex > 0) {
			int[] arrayDiff = ArrayDiff.getArrayDiff(
					getHistoryItems().get(currentIndex - 1).values,
					currentItem.values);
			if (arrayDiff == null)
				return;
			for (int j = 0; j < arrayDiff.length / 2; j += 2) {
				int from = arrayDiff[j];
				int to = arrayDiff[j + 1];

				int y = height / 2 - cardImages[0].getHeight() / 2 / 2;
				int xFrom = (width / 4) + (from * diff)
						- cardImages[0].getWidth() / 8 + diff / 2;
				int xTo = (width / 4) + (to * diff) - cardImages[0].getWidth()
						/ 8 + diff / 2;
				Point p1 = new Point(xFrom, y);
				Point p2 = new Point(xTo, y);

				double angle = Math.atan2(0, xTo - xFrom);
				int diameter = (int) Math.round(p1.distance(p2));
				g.setStroke(new BasicStroke(1));
				Graphics2D g2d = (Graphics2D) g;
				g2d.translate(p1.x, p1.y);
				g2d.rotate(angle);
				g2d.drawArc(0, -25, diameter, 50, 0, 180);
				g2d.fill(new Polygon(new int[] { 0, 5, -5 }, new int[] { 0, -5,
						-5 }, 3));
				g2d.translate(-p1.x, -p1.y);
				g2d.translate(p2.x, p2.y);
				g2d.fill(new Polygon(new int[] { 0, 5, -5 }, new int[] { 0, -5,
						-5 }, 3));
				g.translate(-p2.x, -p2.y);
			}
		}
	}