Java - AWT/Swing

HTML, modify font

If HTML-code shall be depicted in JEditorPane, so the basis-character set can be modified with the following code:


StyleSheet css = ((HTMLEditorKit)jmEditorPane.getEditorKit()).getStyleSheet();
css.addRule("P { margin: 0; font-family: Arial, sans-serif; font-size: 11px; font-style: normal; }");

Eigene Werkzeuge
Werkzeuge

gratis Counter by GOWEB
seit 9.10.2007