My question is: how can I format my output when outputting in JTextArea.
I want to have the same functionality as System.out.format has (custom spaces between values).
Maybe it is possible to print PrintSream objects in JTextArea?
I am currently using append(String s) method but I am not satisfied with the results since this only gives me an option to output String with no formatting options.
Use a JTextPane instead of a JTextArea. Same functionality plus formatted text. API JavaDoc is in the usual places.
Maybe you could point an exact method that does the spacing, because what I can see from examples is only formatting either font color or layout. I will specify my question.
What I have is this:
1. Short name, short number 1.11
2. A little bit longer name, longer number 22.22
3. Very large name and a little longer number after 333.33
4. Very Very super extra large name with even longer number after 4444.44
And what I want is that all the numbers would be aligned in a column .Text should have specified amount of space in each row ( I couldn't demonstrate cause this editor would delete all the spaces I add).