Results 1 to 3 of 3
- 06-02-2012, 10:45 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 13
- Rep Power
- 0
-
Re: Tell a jTextArea to keep the text it already has and put new text on a new line
You're looking for using the JTextArea#append(String text) method. If you want text on a new line, just be sure to add an "\n" on the end of any text appended to the JTextArea.
More importantly, you'd have been able to solve this question yourself quite quickly by simply going to the Swing JTextArea tutorial and API and checking out what methods are available to JTextAreas. If you don't have these links saved in your browser, please be sure to do this now.
You can find the JTextArea tutorial here: JTextArea Tutorial
the Java Tutorials here: The Really Big Index
The JTextArea API here: JTextArea API
And the Java API here: Java APILast edited by Fubarable; 06-02-2012 at 10:52 PM.
- 06-02-2012, 10:51 PM #3
Member
- Join Date
- Jun 2012
- Posts
- 13
- Rep Power
- 0
Similar Threads
-
Transforming xml to text keeps placing blank line at beginning of text file
By DerekRaimann in forum Advanced JavaReplies: 7Last Post: 03-05-2011, 09:25 AM -
Taking a line from a text file if it contains the specified text
By daoping in forum New To JavaReplies: 1Last Post: 02-28-2011, 05:30 PM -
Reverse search a Text file from last line to top line
By Jman85 in forum New To JavaReplies: 8Last Post: 12-28-2010, 02:24 PM -
JTextArea - text align
By bradder in forum AWT / SwingReplies: 1Last Post: 11-29-2007, 07:08 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks