edgesjgraphx

JGraphx : How to avoid adding edges over each other?


I'm working on an application using jGraphx and I want to know how to avoid creating edges over each other.

When I add 2 edges between 2 vetexes, the 2 edges are above eatch other..

Thanks in advance.

EDIT : That's what I get, those are 2 edges with the labels : "dist = 1" and "dist = 4" above each other.

enter image description here


Solution

  • It can be done easily:

        new mxCircleLayout(graph).execute(graph.getDefaultParent());
        new mxParallelEdgeLayout(graph).execute(graph.getDefaultParent());