for(MutableAttributeSet s: all) { StyleConstants.setFontFamily(s, fontName); StyleConstants.setFontSize(s, fontSize); }
do_reapplyAll();
BufferedImage im = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); // this is used to derive the tab width
int gap = tabSize * im.createGraphics().getFontMetrics(new Font(fontName, Font.PLAIN, fontSize)).charWidth('X');
TabStop[] pos = new TabStop[100];
for(int i=0; i<100; i++) { pos[i] = new TabStop(i*gap + gap); }
StyleConstants.setTabSet(tabset, new TabSet(pos));
setParagraphAttributes(0, getLength(), tabset, false);
}