else if (col % cols == 0 && iter.hasNext()) {
else if (col % cols == 0) {
    protected void printLayouterTableBody(Device d, int cols, final boolean renderFirstLineAsHeader, final List components)            throws IOException {        boolean firstRow = true;        int col = 0;        for (Iterator iter = components.iterator(); iter.hasNext();) {            final SComponent c = (SComponent) iter.next();            if (col == 0)                d.print("<tr>");            else if (col % cols == 0 && iter.hasNext()) {                d.print("</tr>");                Utils.printNewline(d, c.getParent());                d.print("<tr>");                firstRow = false;            }            if (firstRow && renderFirstLineAsHeader)                d.print("<th");            else                d.print("<td");            Utils.printTableCellAlignment(d, c);            Utils.printCSSInlineStyleAttributes(d, c);            d.print(">");            c.write(d); // Render component            if (firstRow && renderFirstLineAsHeader)                d.print("</th>");            else                d.print("</td>");            col++;            if (!iter.hasNext()){                d.print("</tr>");                Utils.printNewline(d, c.getParent());            }        }    }