code: private void generateEdges(StringBuilder result, TextInBox parent) {
  		if (!getTree().isLeaf(parent)) {
  			Rectangle2D.Double b1 = getBoundsOfNode(parent);
  			double x1 = b1.getCenterX();
  			double y1 = b1.getCenterY();
  			for (TextInBox child : getChildren(parent)) {
  				Rectangle2D.Double b2 = getBoundsOfNode(child);
  				result.append(line(x1, y1, b2.getCenterX(), b2.getCenterY(),
  						"stroke:black; stroke-width:2px;"));
  
  				generateEdges(result, child);
  			}
  		}
  	}
docs: generating