// This sample demonstrates how to create groups

  // Create two nodes
  ShapeNode master = diagram.getFactory().createShapeNode(10104020);
  ShapeNode subordinate = diagram.getFactory().createShapeNode(10454020);

  // Attach the second node to the first node
  subordinate.attachTo(master, AttachToNode.TopLeft);