Tom*_*Tom 11
进行谷歌搜索建议您应该使用JTextPane,特别是setParagraphAttributes位于此处.
获得AttributeSet所需的方法如下:
MutableAttributeSet set = new SimpleAttributeSet();
StyleConstants.setLineSpacing(set, /* your spacing */);
Run Code Online (Sandbox Code Playgroud)
现在只是传递set的setParagraphAttributes方法.
希望这可以帮助.