Re: New line in a JTextArea (student learning here)
- From: Knute Johnson <nospam@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Jan 2007 19:58:09 -0800
Andrew Thompson wrote:
On Jan 30, 12:35 pm, Knute Johnson <nos...@xxxxxxxxxxxxxxxxxxxxxxx> wrote:Andrew Thompson wrote:...On Jan 29, 11:12 am, Farcus Pottysqirt <where_is_my_...@xxxxxxxxxx>
wrote:
...
..Is the new-lineSure is. Best to initilaise the line feed character as..
character represented differently on a different platform?
System.getProperty( "line.separator" );
Do you know an OS that uses a different line feed that runs Java?
AFAIU, JRE's on windows did historically return \n\r,
whereas *nix variatns use only \n.
OTOH, using System.getProperty("line.separator"),
is 'forward compatible' in the sense that if any new
OS architectures were to become support, or either
Win/*nix to suddenly change the line separator
(my bet would be Windows), the code would adapt.
Andrew T.
\n is a bad habit left over from my C days. I should probably watch that in the future :-).
--
Knute Johnson
email s/nospam/knute/
.
- References:
- New line in a JTextArea (student learning here)
- From: Sandy
- Re: New line in a JTextArea (student learning here)
- From: Knute Johnson
- Re: New line in a JTextArea (student learning here)
- From: Sandy
- Re: New line in a JTextArea (student learning here)
- From: Farcus Pottysqirt
- Re: New line in a JTextArea (student learning here)
- From: Andrew Thompson
- Re: New line in a JTextArea (student learning here)
- From: Knute Johnson
- Re: New line in a JTextArea (student learning here)
- From: Andrew Thompson
- New line in a JTextArea (student learning here)
- Prev by Date: Re: Is there an easy way to find the right class?
- Next by Date: Unknown number of inputs
- Previous by thread: Re: New line in a JTextArea (student learning here)
- Next by thread: Re: New line in a JTextArea (student learning here)
- Index(es):
Relevant Pages
|
|