Is there a way to make text in JTextPane look like a console? By this I mean basically how each character has the same width, so things like ASCII art or spacing indentation will work correctly.
For example, at present, if I type “First,” and then 5 spaces, and then on a new line, “Second,” and then 4 spaces, the two lines do not end at the same position, so if there is text, the following these spaces, the text will not be aligned.
I don't know if it will change anything, but JComponents will also be included in JTextPane.
source
share