@Override
		protected void paintComponent(Graphics g) {
			super.paintComponent(g);
			if (image != null) {
				g.drawImage(image, 0, 0, this);
			}
			Graphics2D g2d = (Graphics2D) g;
			g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
					RenderingHints.VALUE_ANTIALIAS_ON);
			g2d.setColor(waypointColor);

			for (Point p : waypoints) {
				Ellipse2D e2d = new Ellipse2D.Double(p.x - 2, p.y - 2, 5, 5);

				if (mousePos != null && e2d.contains(mousePos)) {
					final String text = String.format("(%d, %d)", p.x, p.y);
					FontMetrics fm = g2d.getFontMetrics();
					int width = fm.stringWidth(text);
					int height = fm.getAscent();
					int x = p.x + width > getWidth() ? p.x - width : p.x;
					int y = p.y < height ? p.y + height : p.y;

					final ColorSpace cs = ColorSpace
							.getInstance(ColorSpace.CS_sRGB);
					float[] rgb = g2d.getColor().getColorComponents(cs,
							new float[3]);
					for (int i = 0; i < rgb.length; i++) {
						rgb[i] = 1 - rgb[i];
					}
					Color inverse = new Color(cs, rgb, g2d.getColor()
							.getAlpha() / 255f / 2);
					g2d.setColor(inverse);
					g2d.fill(e2d);

					g2d.fillRect(x - 2, y - height - 2, width + 4, height + 4);
					g2d.setColor(waypointColor);
					g2d.drawString(text, x, y);
				} else {
					g2d.fill(e2d);
				}
			}
		}