Forums Register Login
JTextArea indent question

How can i make a text append in a JTextArea to be indented, so the first line of the append text get the from the beggining of the left side, and the seconds and subsecuent lines from the same text append gets one character to the left of the first line?


You might consider using a JTextPane with a StyledDocument. See the "TextSamplerDemo" app in How to Use Editor Panes and Text Panes for some ideas.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 1565 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 22, 2018 05:41:26.