It is possible to connect two shapes with a connector shape? I know how to create shapes:
private static void createShapes(Worksheet worksheet) {
Shape rectangle1 = worksheet.getShapes().addAutoShape(AutoShapeType.RECTANGLE, 3, 2, 3, 0, 12, 52);
Shape rectangle2 = worksheet.getShapes().addAutoShape(AutoShapeType.RECTANGLE, 4, 2, 5, 0, 12, 52);
Shape connector = worksheet.getShapes().addAutoShape(AutoShapeType.BENT_CONNECTOR_4, 6, 2, 5, 0, 12, 26);
// connect rectangle1 and rectangle2 with connector
}
But how can I connect the shapes with the connector?
Here is an example of how I would like it to look: