Re: New line in a JTextArea (student learning here)
- From: "Andrew Thompson" <andrewthommo@xxxxxxxxx>
- Date: 29 Jan 2007 19:00:17 -0800
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-line
character represented differently on a different platform?
Sure is. Best to initilaise the line feed character as..
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.
.
- Follow-Ups:
- Re: New line in a JTextArea (student learning here)
- From: Wojtek Bok
- Re: New line in a JTextArea (student learning here)
- From: Gordon Beaton
- Re: New line in a JTextArea (student learning here)
- From: Knute Johnson
- Re: New line in a JTextArea (student learning here)
- 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
- 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: Re: Is there an easy way to find the right class?
- 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
|
|