@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g);

		g.setColor(drawInfo.color);
		Graphics2D g2 = (Graphics2D) g;
		g2.setStroke(drawInfo.stroke);
		strokeWidth = (int) (drawInfo.stroke.getLineWidth() + 0.5);

		switch (drawInfo.type) {
			case Rect:
				if (drawInfo.fill) {
					if (drawInfo.color != drawInfo.innerColor) g.setColor(drawInfo.innerColor);
					g.fillRect(strokeWidth, strokeWidth,
							getWidth() - 2 * strokeWidth,
							getHeight() - 2 * strokeWidth);
				}
				g.setColor(drawInfo.color);
				g.drawRect(strokeWidth, strokeWidth,
						getWidth() - 2 * strokeWidth,
						getHeight() - 2 * strokeWidth);
				break;

			case Oval:
				if (drawInfo.fill) {
					if (drawInfo.color != drawInfo.innerColor) g.setColor(drawInfo.innerColor);
					g.fillOval(strokeWidth, strokeWidth,
							getWidth() - 2 * strokeWidth,
							getHeight() - 2 * strokeWidth);
				}
				g.setColor(drawInfo.color);
				g.drawOval(strokeWidth, strokeWidth,
						getWidth() - 2 * strokeWidth,
						getHeight() - 2 * strokeWidth);
				break;

			case RoundRect:
				if (drawInfo.fill) {
					if (drawInfo.color != drawInfo.innerColor) g.setColor(drawInfo.innerColor);
					g.fillRoundRect(strokeWidth, strokeWidth,
							getWidth() - 2 * strokeWidth,
							getHeight() - 2 * strokeWidth, 50, 50);
				}
				g.setColor(drawInfo.color);
				g.drawRoundRect(strokeWidth, strokeWidth,
						getWidth() - 2 * strokeWidth,
						getHeight() - 2 * strokeWidth, 50, 50);
				break;

			default:
				System.exit(1);
				break;
		}
	}