I have a JTextArea in Java. When I place a large amount of text in it, the text area provides horizontal scrolling.
How can I make my text area wrap instead?
Use the JTextArea#setLineWrap method. This is also illustrated in the Swing JTextArea tutorial
JTextArea#setLineWrap
JTextArea
1.4m articles
1.4m replys
5 comments
56.9k users