I've been looking around for a Java implementation of the force-directed graph layout algorithm but got no fruits so far. Any help will be appreciated :)
Asked
Active
Viewed 1.0k times
10
-
Same question, but for C++: http://stackoverflow.com/questions/713701/force-directed-layout-in-c – Pops May 07 '10 at 00:17
2 Answers
11
Jung:
http://jung.sourceforge.net/index.html
.. has been around for a while, and has many layout algorithms.
You might also check out Gephi at http://gephi.org/ - it's an application, not a lib, but it's open source Java.
There's also Processing (a Java superlanguage) and the physics lib here: http://www.cs.princeton.edu/~traer/physics/random_arboretum/index.html (click in the box a bunch of times to create the graph).

Andrew
- 4,574
- 26
- 31
-
I agree. Jung is excellent. I compared a LOT of Java directed-graph libraries for a work project, and Jung is the best by far. – Chris Dolan May 07 '10 at 02:49
-
I nearly forgot Prefuse! http://www.prefuse.org/ - it's not very active, but I've had good results with the Flash port of Prefuse called Flare. – Andrew May 07 '10 at 23:42
1
My searching brought up four closely-related results; I don't know what you need it for, but hopefully at least one of them will be helpful:
- Force-based graph project in Java at Google Code
- Force-directed map labeling
- Force-directed map overlays
- The link I posted in the comment brought up VTK, whose website does claim some support for Java though I haven't researched it thoroughly.

Pops
- 30,199
- 37
- 136
- 151