With the output text in a textarea the focus is on building a long string to be fed to the JTextArea constructor.
In Words.java (another Repo) each line is created by using System.out.println().
In WordsFrame.java we have a textarea containing a single string s with all lines of output:
To build s we have to concatenate each output line with s += output line
Each output line should contain the special character “\n” (i.e. go to the next line).