device.print("<table><tr><td");
device.print("<table class=\"SLayout\"><tr><td class=\"SLayout\"");
    public void writeContent(final Device device,                             final SComponent _c)            throws IOException {        final SProgressBar component = (SProgressBar) _c;//--- code from write-template.        String style = component.getStyle();        /* FIXME: The problem here is that the component size is used as the         * size for the progressbar. If text is rendered below         * (isStringPainted), then that text is out of the component box. So         * either create a distinct ProgressBar size or subtract some height.         * OL: created distinct height. other solution is removing string          * completely.         */                SDimension size = component.getProgressBarDimension();        int width = size != null ? size.getIntWidth() : 200;        int height = size != null ? size.getIntHeight() : 5;        if (component.isBorderPainted()) {            device.print("<div style=\"width: 100%;height:100%;border: 1px solid ");            Utils.write(device, component.getBorderColor());            device.print(";\">");            width -= 2; //compensate for border            height -= 2;        }        device.print("<table><tr><td");        if (component.getFilledColor() != null) {            device.print(" style=\"background-color: ");            Utils.write(device, component.getFilledColor());            device.print(";\"");        }        device.print(">");        device.print("<img");        Utils.optAttribute(device, "src", BLIND_ICON.getURL());        device.print(" width=\"");        device.print(String.valueOf(Math.round(width * component.getPercentComplete())));        device.print("\"");        device.print(" height=\"");        device.print(String.valueOf(height));        device.print("\"></td>");        device.print("<td");        if (component.getUnfilledColor() != null) {            device.print(" style=\"background-color: ");            Utils.write(device, component.getUnfilledColor());           device.print(";\"");        }        device.print(">");        device.print("<img");        Utils.optAttribute(device, "src", BLIND_ICON.getURL());        device.print(" width=\"");        device.print(String.valueOf(Math.round(width * (1 - component.getPercentComplete()))));        device.print("\" height=\"");        device.print(String.valueOf(height));        device.print("\"></td></tr></table>");        if (component.isBorderPainted()) {            device.print("</div>");        }        if (component.isStringPainted()) {            device.print("<div style=\"width: 100%; text-align: center;\"");            if (style != null) {                device.print(" class=\"");                Utils.write(device, style);                device.print("_string\"");            }            device.print(">");            Utils.write(device, component.getString());            device.print("</div>");        }//--- end code from write-template.    }