All, I am trying to position this table manually by using the table.setLeft(200f) function seen below. This is not working. It works for a Text object, but not for tables.
Please advise.
public void addBYHeaders() throws InternalPDFException {
// add table
Table table = new Table();
table.setColumnWidths("192 68 95");
table.setMarginTop("10");
table.setLeft(200f);
// draw border lines
table.setDefaultCellBorder(new BorderPartAll(), BorderStyleTypeEnum.NORMAL, "black", null, null, 1f, null);
// cell format
Text leftCell = this.getText(this.getheaderFontSize());
leftCell.setAlignment(TextAlignmentTypeEnum.CENTER);
leftCell.setIsTrueTypeFontBold(true);
leftCell.setBackgroundColor(this.getheaderColor());
leftCell.setMarginTop("2");
leftCell.setMarginBottom("2");
leftCell.setMarginLeft("2");
leftCell.setMarginRight("2");
// create row
Row row = new Row();
row.setBackgroundColor(this.getheaderColor());
// write
row.setCells(new Cell(),
this.getText(this.getheaderFontSize()),
new TextFormat("BY2012 $M", leftCell),
new TextFormat("BY2012 $M", leftCell),
new TextFormat("TY $M", leftCell));
// add row to table
table.addRow(row);
// add table to page
this.addComponent(table);
}