Re: How to add rows of text to JTextArea
- From: Daniel <daik.no-spam@xxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Apr 2005 18:16:54 +0200
take a look at the insert method of the JTextArea
or if you want it at the very end the append method.
for your example it would be
JTextArea ta = JTextArea();
ta.appen("row1\n");
ta.appen("row2\n");
ta.appen("row3\n");
you may want to investigate the line-breaking further as I am not sure
this will work on all platforms.
but both the append and the insert methods seem to do the job you ask.
----
Daniel
http://www.daik.se
>Is a way to add text to a JTextArea as rows?
>
>For instance :
>
>row1
>row2
>row3
>
>?
.
- Follow-Ups:
- Re: How to add rows of text to JTextArea
- From: Gil
- Re: How to add rows of text to JTextArea
- References:
- How to add rows of text to JTextArea
- From: brightoceanlight
- How to add rows of text to JTextArea
- Prev by Date: Color Spaces
- Next by Date: Re: How to check if a String input is integer, float or NAN
- Previous by thread: How to add rows of text to JTextArea
- Next by thread: Re: How to add rows of text to JTextArea
- Index(es):
Relevant Pages
|