I am using a jTextArea in a javaswing application with Netbeans 7. Want to make it possible to automatically create a new line when the text entered gets to the end of the jtextarea. This will mean that there will not be a horizontal scrollbar. The "enter" button will not need to be pressed before a new line is created
A simple illustration is like when using a word document. A new line is created when the user gets to the end of each line of the document.
Any suggestion.
You can do this using
textArea.setWrapStyleWord(true);
textArea.setLineWrap(true);