Re: About JTextPane, Why "Not equal" ?
- From: Tom Hawtin <usenet@xxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 18:32:13 +0100
Red Orchid wrote:
I think, it means that platform-independent code is not guaranteed
with "JTextPane". And also, it means that an app has bugs if both
"..setText" and "..insertString" are used in the app.
That would be like saying that an app has bugs in if it using String. Some of String's method pick up the default locale. As ever, static variables suck big time.
The above code prints this:
--
13
13
10
48
13
13
10
49
--
Not it doesn't, it prints:
10
48
13
10
49
Which is a little eccentric. If I switch from 1.4.2_13 to 1.6.0 I get:
13
10
48
13
10
49
Note that 13(\r) was doubled.
Was "JTextPane" and "Document" designed properly ?
In terms of duplicating the CR, that's a pure implementation bug.
Tom Hawtin
.
- Follow-Ups:
- Re: About JTextPane, Why "Not equal" ?
- From: Andrew Thompson
- Re: About JTextPane, Why "Not equal" ?
- References:
- About JTextPane, Why "Not equal" ?
- From: Red Orchid
- Re: About JTextPane, Why "Not equal" ?
- From: SadRed
- Re: About JTextPane, Why "Not equal" ?
- From: Andrew Thompson
- Re: About JTextPane, Why "Not equal" ?
- From: Tom Hawtin
- Re: About JTextPane, Why "Not equal" ?
- From: Red Orchid
- About JTextPane, Why "Not equal" ?
- Prev by Date: Re: Quick way to initialize array with all zeros
- Next by Date: Re: About JTextPane, Why "Not equal" ?
- Previous by thread: Re: About JTextPane, Why "Not equal" ?
- Next by thread: Re: About JTextPane, Why "Not equal" ?
- Index(es):
Relevant Pages
|