Question

I created a program that builds and draw nested cyclic graphs (with undirected edges) in a JFrame using java awt.

The problem is that if the position of the nodes is not explicitly specified, or created at random, the graph becomes very messy, with edges crossing and vertex colliding.

I would like to implement an algorithm for repositioning to better distribute the nodes, in a more homogeneous and clean way.

Can someone help me?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top