private void paintLinks(Graphics2D g) {
			Stroke s = g.getStroke();
			Link in, out;

			int max = 0;
			for (Node n : graph.nodes) {
				for (int i = 0; i < n.inLinks.size(); i++) {
					in = n.inLinks.get(i);
					out = n.outLinks.get(i);

					if (out.toNode.id < n.id)
						continue;
					int total = in.packets.size() + out.packets.size();
					if (total > max)
						max = total;
				}
			}

			for (Node n : graph.nodes) {
				for (int i = 0; i < n.inLinks.size(); i++) {
					in = n.inLinks.get(i);
					out = n.outLinks.get(i);

					if (out.toNode.id < n.id)
						continue;

					g.setStroke(new BasicStroke((float) (2)));
					paintLink(g, out, linkColor);

					int total = in.packets.size() + out.packets.size();
					if (total == 0)
						continue;
					double width = max - total;
					if (width < 0) {
						width = 0;
					}

					BasicStroke stroke = new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f,
							new float[] { 4.0f, (float) (width) }, 0.0f);
					g.setStroke(stroke);

					paintLink(g, out, packetColor);
				}
			}

			g.setStroke(s);
		}