JUNG get specfic edge in an graph

34 Views Asked by At

at the moment I have a graph, and I am trying to get a specific edge. Because i want to change the color of this edge. I know how can i change the color of the edge. But i want to change a specific edge. I have root node "V0" and these is related to "V1" until "V0" is related to "V20". At the moment, I am searching for a possibility to change only the edge color between "V0" and "V12".

vv.getRenderContext().setEdgeDrawPaintFunction(v-> v.equals(edge) ? Color.red : Color.black );
1

There are 1 best solutions below

0
Doktor_DOOM On

i found a solution thanks. I have to use the following method.

int test = graph.getEdge("Source","Target");