1
所以我試圖使JTextPane中的文本加倍間隔。這是我的代碼:JTextPane - 製作插入符號的大小?
MutableAttributeSet attrs = editor.getInputAttributes();
StyleConstants.setLineSpacing(attrs, 2);
editor.getStyledDocument().setParagraphAttributes(0, doc.getLength() + 1, attrs, true);
這個問題是,光標(插入符號)是三個或四個行空格一樣大。如何將脫字符調整爲正常大小?
這裏是一個屏幕剪斷