Re: About JTextPane, Why "Not equal" ?



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
.



Relevant Pages

  • Re: Suggestions for text search and replace tool
    ... It's got bugs. ... it takes the app 30 seconds at about 100% of one 2.5GHz CPU to do ... The Classic app I'm currently using does the search and replace job with ... MassReplaceIt isn't really ready for the prime time yet, ...
    (uk.comp.sys.mac)
  • Re: The reliability of python threads
    ... not just the database app). ... not much anybody can say about your programs or the reliability of ... new ways to track bugs down. ...
    (comp.lang.python)
  • Re: "Unexpected error" strangeness...(ipaq vb.net)
    ... > and Exception.StackTrace to help narrow down the bugs. ... >> I've written an app that contacts a web server in order to log in, ... >> * The input panel doesn't appear on the menu bar for the login form (a ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: IOCP critical sections and mutexes
    ... It is well-known fact that some otherwise invisible bugs reveal ... themselves only under the stress. ... works perfectly well even under the stress if you use mutex instead ... then pushes it in a queue that will be later processed by my main app ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Dr. Watson shutdown/logoff error
    ... > some app that is designed to crash Dr. Watson. ... > known bugs in Dr.W and found none. ... Some referred to the Gravis Exterminator game controls as being ... Experience Control Panel (driving a Gravis Exterminator Joystick) installed. ...
    (microsoft.public.windowsxp.help_and_support)