Enabling Word-Wrapping and Line-Wrapping in a JTextArea Component
import javax.swing.JTextArea; public class Main { public static void main(String[] argv) { JTextArea c = new JTextArea(); // Enable line-wrapping c.setLineWrap(true); c.setWrapStyleWord(false); } }