Steps to reproduce:
* Import large enough STG.
* Open it in editor. It should be laid out with dot.
Some components will be overlapping.
* Select Layout -> "Layout using dot" from main menu.
The overlaps will be eliminated.
The internal cause is that the calculation of text bounding boxes requires creation of GlyphVector, which requires FontRenderContext, which is obtained from Graphics2D, which is not available until the component is first drawn.
Possible solutions:
* Create a dummy FontRenderContext for boundingbox measurement. There are only a few parameters there and they are not very important (line antialiasing). So, the result should probably not change by much. :-\
* Feed the Graphics2D or FontRenderContext to getBoundingBox :-\
* Never rely on getBoundingBox() before the first call to draw() :-\
* Your solution?