Article View: borland.public.jbuilder.java.swing
Article #650Re: null pointer while changing L & F
From: Lori M Olson [TeamB]
Date: Sat, 16 Apr 2005 15:39
Date: Sat, 16 Apr 2005 15:39
42 lines
2495 bytes
2495 bytes
GEORGE wrote:
> I am using the code below to change the look and feel of my app using 3
> radio buttons for Metal, Motif and Windows.
>
> The L & F changes alright. But I get a null pointer exception along the
> way. The stack trace is also shown below but I am unable to make much of
> it. Any help would be appreciated.
>
> TIA
> George
>
What leads you to believe that piece of code is responsible? It's not
part of the stack trace? Is it that the problem goes away if you
comment out that code or something like that?
I suspect that your code is simply exposing an different, underlying
problem. Reading stack traces of Swing bugs is usually a thankless
task. I really hate finding NPE's in the JDK. If you run in the
debugger, you can click on those line numbers and go directly to the
line on which the NPE happened. Looks like something needed a preferred
size to be set, and it was not. But that's just a wild guess.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<426131bc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4260659e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,d97b42cc813c1e29 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Sat, 16 Apr 2005 09:39:27 -0600 From: "Lori M Olson [TeamB]" <javadragon@techie.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax;nscd1) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: null pointer while changing L & F References: <4260659e@newsgroups.borland.com> In-Reply-To: <4260659e@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.179.181.200 Message-ID: <426131bc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1113665980 142.179.181.200 (16 Apr 2005 08:39:40 -0800) Lines: 42 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail