public void paintBorder(Component component, Graphics g, int x, int y, int w, int h) {

		g.setColor(Color.black);
		g.drawRect(x + dist / 2, y + dist / 2, w - dist, h - dist);

		if (component.hasFocus()) {


			for (int i = 0; i < locations.length; i++) {
				Rectangle rect = getRectangle(x, y, w, h, locations[i]);
				g.setColor(Color.WHITE);
				g.fillRect(rect.x, rect.y, rect.width - 1, rect.height - 1);
				g.setColor(Color.BLACK);
				g.drawRect(rect.x, rect.y, rect.width - 1, rect.height - 1);
			}
		}
	}