Re: About JTextPane, Why "Not equal" ?
- From: Lew <lew@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 14:17:13 -0400
Tom Hawtin <use...@xxxxxxxxxxxxxxxxx> wrote:
..As ever, static variables suck big time.
Andrew Thompson wrote:
'For those of us that are a little slower than the rest'
(OK.. me) could you expand a little on that?
Whilst awaiting Tom's answer I shall venture a guess, which if Tom's answer differs I shall almost certainly abandon in favor of his explanation.
Static variables are the global variables of Java. They have implicit effects ignorance of which can lead one to create bugs.
Locale in a String is such a thing - global to all instances of String within a particular run of the JVM unless explicitly specified. This causes portability issues in such code. Likewise, I guess the AttributeSets in a JTextPane are implicit and can lead to surprising portability issues.
I do not know what parts of the JTextPane issue are literally static or global, but I can see the point about implicit characteristics.
Am I close?
-- Lew
.
- Follow-Ups:
- Re: About JTextPane, Why "Not equal" ?
- From: Tom Hawtin
- 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: Red Orchid
- Re: About JTextPane, Why "Not equal" ?
- From: Tom Hawtin
- Re: About JTextPane, Why "Not equal" ?
- From: Andrew Thompson
- About JTextPane, Why "Not equal" ?
- Prev by Date: Re: Quick way to initialize array with all zeros
- Next by Date: gl4java
- Previous by thread: Re: About JTextPane, Why "Not equal" ?
- Next by thread: Re: About JTextPane, Why "Not equal" ?
- Index(es):
Relevant Pages
|