The HTMLTableHeader class inherits from the HTMLTableCell class. It creates a specific type of cell, the header cell, giving you a <th> cell instead of a <td> cell. Like the HTMLTableCell class, you call various methods in order to update or retrieve attributes of the header cell.
The following is an example for HTMLTableHeader:
// Create the table headers. HTMLTableHeader account_header = new HTMLTableHeader(new HTMLText("ACCOUNT")); HTMLTableHeader name_header = new HTMLTableHeader(new HTMLText("NAME")); HTMLTableHeader balance_header = new HTMLTableHeader(); HTMLText balance = new HTMLText("BALANCE"); balance_header.setElement(balance); // Add the table headers to an HTMLTable object (assume that the table already exists). table.addColumnHeader(account_header); table.addColumnHeader(name_header); table.addColumnHeader(balance_header);