Joke Collection Website - Blessing messages - Java, JTextArea, how to wrap words automatically?
Java, JTextArea, how to wrap words automatically?
TextArea has a method called setLineWrap (Boolean wrap). If this parameter is set to True, it can wrap automatically.
If you want each input to be a line break, add a "\r\n" at the end of the last input.
For example:
JTextArea.append ("input content"+"\ r \ n");
In this way, every typing is a new line.
You need to add \r\n, so that you can take the test, and then you can wrap the line after writing a paragraph.
- Related articles
- Please give me a short birthday message for your 70th birthday.
- What is the stem of Mercedes-Benz Moon?
- Which is more economical, texting or calling for a minute? How much difference?
- How many free text messages can Yixin use every day?
- Call and send text messages during blind date.
- What if the old man's mobile phone receives the verification code and finds it is fraud?
- What are the packages of China Telecom's mobile phone card?
- How does Samsung a8 set the shortcut keys pulled up below?
- How are WeChat friends added?
- How does Huawei divide into two desktops?