java - Line-Spacing in JTextArea -


It seems that my current JTextArea example is about 1 or 1.5 lining. Can anyone tell me how to change line-spacing in JTextArea example?

Performing a Google search gives you a suggestion JTextPane and especially You should use the setParagraphAttributes located.

The way you get AttributeSet is as follows:

MutableAttributeSet set = New SimpleAttributeSet (); StyleConstants.setLineSpacing (set, / * your spacing * /);

Now just pass in the set setParagraphAttributes method.

Hope it helps.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -