code: private void paintColumnHeadings(final WTable table, final WebXmlRenderContext renderContext) {
  		XmlStringBuilder xml = renderContext.getWriter();
  		int[] columnOrder = table.getColumnOrder();
  		TableModel model = table.getTableModel();
  		final int columnCount = columnOrder == null ? table.getColumnCount() : columnOrder.length;
  
  		xml.appendTagOpen("ui:thead");
  		xml.appendOptionalAttribute("hidden", !table.isShowColumnHeaders(), "true");
  		xml.appendClose();
  
  		for (int i = 0; i < columnCount; i++) {
  			int colIndex = columnOrder == null ? i : columnOrder[i];
  			WTableColumn col = table.getColumn(colIndex);
  
  			if (col.isVisible()) {
  				boolean sortable = model.isSortable(colIndex);
  				paintColumnHeading(col, sortable, renderContext);
  			}
  		}
  
  		xml.appendEndTag("ui:thead");
  	}
docs: Paints the column headings for the given table.
  
  @param table the table to paint the headings for.
  @param renderContext the RenderContext to paint to.