public void paint(Graphics gr1d, Object destinationComponent, Boolean b) {

		final Graphics2D gr = (Graphics2D) gr1d;
		gr.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

		final int n = G.getVerticesCount();
		if (n == 0)
			return;

		AbstractGraphRenderer.getCurrentGraphRenderer(gd.getBlackboard()).ignoreRepaints(new Runnable() {
			@SuppressWarnings({ "unchecked" })
			public void run() {

				// boolean[] marks = new boolean[n];
				Vertex V[] = G.getVertexArray();
				final Vertex parent[] = new Vertex[n];

				// consider the hole structure as a tree
				AlgorithmUtils.BFSrun(G, V[0], new AlgorithmUtils.BFSListener() {
					@Override
					public void visit(BaseVertex v, BaseVertex p) {
						parent[v.getId()] = (Vertex) p;
					}
				});

				for (Vertex v : G) {
					if (v.getId() == 0)
						continue;
					if (v.getColor() == 0) {
						Vertex v1 = parent[v.getId()];
						if (v1 == null || v1.getColor() != 0)
							continue;

						Vertex v2 = parent[v1.getId()];
						if (v2 == null || v2.getColor() != 0)
							continue;

						// generate the curve between v1, v2 and v3
						GraphPoint p1 = GraphPoint.mul(v.getLocation(),G.getZoomFactor());
						GraphPoint p2 = GraphPoint.mul(v1.getLocation(),G.getZoomFactor());
						GraphPoint p3 = GraphPoint.mul(v2.getLocation(),G.getZoomFactor());

						Integer w1 = G.getEdge(v, v1).getWeight();// (Integer)
						Integer w2 = G.getEdge(v1, v2).getWeight();// (Integer)
						Integer w3 = 1;
						
						int startWidth = w1;
						int endWidth = w3;
						int middleWidth = w2;
						if(!v.equals(G.getVertex(0))){
							 startWidth = w3;
							 endWidth = w1;
							 middleWidth = w2;
								
						}
						double teta1 = AlgorithmUtils.getAngle(p1, p2);
						double teta2 = AlgorithmUtils.getAngle(p1, p3);
						double teta3 = AlgorithmUtils.getAngle(p2, p3);

						java.awt.geom.QuadCurve2D c1 = new QuadCurve2D.Double(p1.x - startWidth * Math.sin(teta1),
								p1.y + startWidth * Math.cos(teta1), p2.x - middleWidth * Math.sin(teta2),
								p2.y + middleWidth * Math.cos(teta2), p3.x - endWidth * Math.sin(teta3),
								p3.y + endWidth * Math.cos(teta3));

						java.awt.geom.QuadCurve2D c2 = new QuadCurve2D.Double(p3.x + endWidth * Math.sin(teta3),
								p3.y - endWidth * Math.cos(teta3), p2.x + middleWidth * Math.sin(teta2),
								p2.y - middleWidth * Math.cos(teta2), p1.x + startWidth * Math.sin(teta1),
								p1.y - startWidth * Math.cos(teta1));
						GeneralPath gp = new GeneralPath(c1);
						gp.append(c2, true);
						gp.closePath();
						gr.setColor(color);

						// fill the curve
						gr.fill(gp);
					}
				}
			}

		}, false /* dont repaint after */);
	}