// This sample shows how to create table cells that span several
  // rows and columns, and how to designate some rows as headers

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

  // Setup the number of rows and columns in the table
  table.redimTable(25);

  // Mark the first and the fourth rows as headers
  table.getRows().get(0).setHeader(true);
  table.getRows().get(3).setHeader(true);

  // Span the cells in the header rows to cover the entire rows
  table.getCell(00).setColumnSpan(2);
  table.getCell(00).setText("Header 1");
  table.getCell(03).setColumnSpan(2);
  table.getCell(03).setText("Header 2");

  // Span the cells from the second column below the first header row
  table.getCell(11).setRowSpan(2);
  table.getCell(11).setText("span");

  // Offset the header rows, so that the 'expand/collapse'
  // icon is positioned to the left of the cells
  table.setOffsetHeaderRows(true);