}
final HTMLEditorKit kit = new ScaledEditorKit(){
@Override
public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException {
if (doc instanceof HTMLDocument) {
HTMLWriter w = new SHTMLWriter(out, (HTMLDocument) doc, pos, len);
w.write();
}
else {
super.write(out, doc, pos, len);
}
}