This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Move to next line. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Move to next line." Watch "Move to next line." New topic
Author

Move to next line.

Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Hello.

I guess its simple question, but i can find answer. So for example I have button with Action:

textArea.insert("Sample Text");

And now I would like to move to next line automatically.

How can i do it?

textArea - its my JTextArea

/edit - ok sorry, found it ( "\n" )
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Move to next line.
 
Similar Threads
Formatting text in JTextArea
Will a started thread run to completion in this example?
Info Regarding readLine() in java
textarea array value stored in another array
textarea array value stored in another array