Automatic layout for class diagrams

hi, i was wondering if you guys have an idea or algorithm with regards on the layout process for class diagrams. I have a thesis similar to visual paradigm and i wanted to do that automatic layout thing that it has. we’re in the later stages of the thesis and this is one of the obstacles that we’re facing… hope to hear from you all java experts out there. p.s. our thesis is far from and nothing compared to the superb visual paradigm.