Mega Code Archive
Categories
/
Java Tutorial
/
Swing
Setting JTextArea Line Wrap and Wrap Style
JTextArea textArea = new JTextArea("..."); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); JScrollPane scrollPane = new JScrollPane(textArea);