I have the following two strings and I would like to display them just as what I typed here in JTextArea.
Code:
" a| b| c|"
" aa| bb| ccc|"
However, I noticed that JTextArea cannot line them up nicely becuase it treats the empty space different from regular characters. If I use Notepad or any other text editor, I can get nice format but JTextArea just cannot. I tried JTextPane, the same thing. Seems to me they give ' ' (space) half of the size of a regular character (like 'a').
Any way to work around this? Thanks very much.