How to wrap text in a JTextArea September 4, 2023 by Tarik Use the JTextArea#setLineWrap method. This is also illustrated in the Swing JTextArea tutorial