HOW TO DRAW EDGES WITH JUNG LIBRARY? : I have an implementation of a Graph and I want to visualize it using JUNG. My problem is that when I add an edge, I visualize 2 edges, for example 1 to 2 and 2 to 1 with the same weight, but I just want to see 1 edge. 

My code: 



public void createGraph(HashMap<Integer, Vertice<Integer, Integer>> vertices, long[][] matriz) {

		if (vertices != null) {

			Graph<Vertice<Integer, Integer>, Arista<Integer, Integer>> ig = new SparseMultigraph<Vertice<Integer, Integer>, Arista<Integer, Integer>>();
			for (int i = 0; i < vertices.size(); i++) {
				ig.addVertex(vertices.get(i));
			}

			
			for (int i = 0; i < matriz.length; i++) {
				for (int j = 0; j < i; j++) {
					if(matriz[i][j] > 0){
						Arista<Integer, Integer> a= new Arista(vertices.get(i), vertices.get(j), (int)matriz[i][j]);
						ig.addEdge(a, vertices.get(i), vertices.get(j));
					}					
				}
			}

	
			VisualizationImageServer<Vertice<Integer, Integer>, Arista<Integer, Integer>> vs = new VisualizationImageServer<Vertice<Integer, Integer>, Arista<Integer, Integer>>(
					new KKLayout<Vertice<Integer, Integer>, Arista<Integer, Integer>>(ig), new Dimension(680, 340));
			vs.setBackground(Color.GRAY);

	
			Transformer<Vertice<Integer, Integer>, Paint> vertexColor = new Transformer<Vertice<Integer, Integer>, Paint>() {
				@Override
				public Paint transform(Vertice<Integer, Integer> i) {
					return Color.GREEN;
				}
			};

			vs.getRenderContext().setVertexFillPaintTransformer(vertexColor);

	
			vs.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<Vertice<Integer, Integer>>());
			vs.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);

			
			vs.getRenderContext().setEdgeLabelTransformer(new Transformer<Arista<Integer, Integer>, String>() {
				public String transform(Arista<Integer, Integer> e) {
					return (e.toString());
				}
			});

			this.add(vs, BorderLayout.CENTER);
		}
	}
}