让Java swing 中的JTextArea换行

JTextArea有一个函数setLineWrap(boolean wrap),当输入到文本框的末尾时就换行。
原文地址:https://www.cnblogs.com/gwq369/p/5418236.html