if (showAsFormComponent) device.print("<button name=\"") .print(Utils.event(dialog)) .print("\" value=\"") .print(event) .print("\">"); else
    private void writeWindowIcon(Device device, SDialog dialog,                                 int event, SIcon icon) throws IOException {        boolean showAsFormComponent = dialog.getShowAsFormComponent();        RequestURL addr = dialog.getRequestURL();        addr.addParameter(Utils.event(dialog), event);        device.print("<th");        Utils.optAttribute(device, "width", getIconWidth(icon));        device.print(">");        if (showAsFormComponent)            device.print("<button name=\"")                    .print(Utils.event(dialog))                    .print("\" value=\"")                    .print(event)                    .print("\">");        else            device.print("<a href=\"")                    .print(dialog.getRequestURL()                    .addParameter(Utils.event(dialog) + "=" + event).toString())                    .print("\">");        writeIcon(device, icon);        if (showAsFormComponent)            device.print("</button>");        else            device.print("</a>");        device.print("</th>");    }