Я много гуглил, но ничего не нашел по этой теме.
Вот мой код:< /p>
Код: Выделить всё
hebrewField = new JTextPane();
hebrewField.setFont(ApplicationFonts.getHebrewFont(30F));
hebrewField.setDocument(new NikudStyledDocument(true));
hebrewField.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
hebrewField.setMinimumSize(new Dimension(Settings.getKeyboardWidth() - 30,
(heightTotal - heightBorderTitel)));
hebrewField.setMaximumSize(
new Dimension(this.widthTotal, (heightTotal - heightBorderTitel)));
hebrewField.setBorder(
BorderFactory.createTitledBorder(translator.realisticTranslate(
Translation.HEBRAEISCH__EINFACHE_SCHREIBWEISE)));
changeLineSpacing(hebrewField);
Код: Выделить всё
private void changeLineSpacing(JTextPane pane) {
SimpleAttributeSet set = new SimpleAttributeSet(pane.getParagraphAttributes());
StyleConstants.setLineSpacing(set, 0.5F);
pane.setParagraphAttributes(set, true);
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... ce-the-pro