In my Java application, i need some sort of a layout algorithm. The first approach is as follows:
I would recommend using the GraphStream API. It handles the DOT format and the visualization is quite nice.