// This sample shows how to associate anchor points with table rows

  // Create a sample table
  TableNode table = diagram.getFactory().createTableNode(10105040);

  // Set the number of rows and columns
  table.setRowCount(2);
  table.setColumnCount(3);

  // Adjust the table column widths
  table.getColumns().get(0).setWidth(15);
  table.getColumns().get(1).setWidth(50);
  table.getColumns().get(2).setWidth(15);
  table.getColumns().get(0).setColumnStyle(ColumnStyle.FixedWidth);
  table.getColumns().get(1).setColumnStyle(ColumnStyle.AutoWidth);
  table.getColumns().get(2).setColumnStyle(ColumnStyle.FixedWidth);

  // Create an anchor pattern to be assigned to the table
  AnchorPattern pattern =
    new AnchorPattern(
      new AnchorPoint[]
      {
        new AnchorPoint(5050, true, false, Color.BLUE, (short)0),
        new AnchorPoint(5050, false, true, Color.BLUE, (short)2)
      }"MyPattern");

  // Use the newly created anchor pattern for all table rows
  table.setRowAnchorPattern(pattern);