// This sample demonstrates how to connect tables programmatically
  // and how to customize links' arrowheads

  // Create two related tables
  TableNode t1 = diagram.getFactory().createTableNode(10104050);
  TableNode t2 = diagram.getFactory().createTableNode(80104050);

  // Setup tables
  t1.redimTable(12);
  t2.redimTable(12);

  // Create a link which connects the tables
  DiagramLink link = diagram.getFactory().createDiagramLink(t1, 0, t2, 1);

  // Set the link's style to cascading
  link.setSegmentCount(3);
  link.setStyle(LinkStyle.Cascading);
  link.setCascadeOrientation(Orientation.Horizontal);

  // Set the link's arrowhead shapes
  link.setHeadShape(ArrowHeads.RevTriangle);
  link.setHeadShapeSize(3);
  link.setBaseShape(ArrowHeads.Tetragon);
  link.setBaseShapeSize(5);