@Override
	public void paint(Graphics g) {
		Graphics2D g2d = (Graphics2D) g;
		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);

		drawMain(g2d, rectangles.get(0).getX(), rectangles.get(0).getY(),
				rectangles.get(0).getWidth(), rectangles.get(0).getHeigth());
		g2d.setColor(Color.BLUE);
		for (int i = 1; i < rectangles.size(); i++) {
			draw(g2d, rectangles.get(i).getX(), rectangles.get(i).getY(),
					rectangles.get(i).getWidth(), rectangles.get(i).getHeigth());
		}
	}