Re: How to add rows of text to JTextArea
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Mon, 25 Apr 2005 15:09:22 +0200
znôrt wrote:
If you give some importance to portability (wich could be the case since you're using Java), this is better:
ta.append("row1" + System.getProperty("line.separator")) ;
No, not at all. line.separator identifies the operating system's line separator, not the line separator used inside of Java. Java always uses just '\n', except in I/O methods like like BufferedReader.readLine(), which are supposed to to the necessary conversion.
If you append System.getProperty("line.separator") you in fact make your application less portable, not more.
/Thomas
-- The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq .
- Follow-Ups:
- Re: How to add rows of text to JTextArea
- From: znôrt
- Re: How to add rows of text to JTextArea
- References:
- How to add rows of text to JTextArea
- From: brightoceanlight
- Re: How to add rows of text to JTextArea
- From: Daniel
- Re: How to add rows of text to JTextArea
- From: Gil
- Re: How to add rows of text to JTextArea
- From: znôrt
- How to add rows of text to JTextArea
- Prev by Date: Re: Table cell renderer problem - paint problem?
- Next by Date: Styled Document and icons
- Previous by thread: Re: How to add rows of text to JTextArea
- Next by thread: Re: How to add rows of text to JTextArea
- Index(es):
Relevant Pages
|
|