JFrame add scrollbar

I’ve tried a few tutorials and had a look at other answers but it still doesn’t seem to help me, I want to add a scrollbar to this console-like JTextArea, and keep the property whereby each new line …