// If _styleSheetURL is non-null, we set the style sheet
// once and only once. If try to do this in a static initializer,
// then the styles are wrong.
HTMLDocument doc = (HTMLDocument) pane.getDocument();
StyleSheet styleSheet = doc.getStyleSheet();
styleSheet.importStyleSheet(_styleSheetURL);
new HTMLEditorKit().setStyleSheet(styleSheet);
_styleSheetURL = null;
}
// http://mindprod.com/jgloss/antialiasing.html says that in