🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9683

Re: Null pointer exception for JList-derived class

#9683
From: James Cook
Date: Tue, 15 Feb 2000 00:00
39 lines
1995 bytes
Not to make you work extra hard on this, but have you tried to duplicate the
problem. I've never had a line similar to:

    myScrollpane.setViewport(null);

appear in my jbInit. That would certainly be strange...

jim

<janene_r_mccrillis@my-deja.com> wrote in message
news:88c4fu$nte$1@nnrp1.deja.com...
> In article <38a87c52.0@news.dot.state.oh.us>,
>   "James Cook" <jimcook.spaminator@remove.for.spam.iname.com> wrote:
> > Janene, can you post any references to MyList from your jbInit method?
>
> Well, I did figure out that the Designer had initialized the viewport
> for the scrollpane to null, so when it later tried to do the
>
> myScrollpane.getViewport.add(mylist_variable, null);
>
> there was no viewport and the getViewport returned null, hence my null
> pointer exception. I removed the line setting the viewport to null and
> that seems to have worked, but why did the designer put that in in the
> first place?
>
> > Also, how did you go about adding MyList to your GUI while in the
> designer?
> > Did you add MyList to the toolbar palette?
>
> Yes, I added it to the "Other" tab of the palette then just dragged it
> into place like any other component. Is there something more I'm
> supposed to do?
>
> Janene
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Technical Details
Message-ID: <38a9b547.0@news.dot.state.oh.us>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <889tfc$6bo$1@nnrp1.deja.com> <38a87c52.0@news.dot.state.oh.us> <88c4fu$nte$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,36010c081a23917d
X-Google-Attributes: gid111d45,public
From: "James Cook" <jimcook.spaminator@remove.for.spam.iname.com>
Subject: Re: Null pointer exception for JList-derived class
Date: 2000/02/15
Message-ID: <38a9b547.0@news.dot.state.oh.us>
X-Deja-AN: 586263341
References: <889tfc$6bo$1@nnrp1.deja.com> <38a87c52.0@news.dot.state.oh.us> <88c4fu$nte$1@nnrp1.deja.com>
X-Trace: 15 Feb 2000 15:21:27 -0500, dotfw001-dmz.dot.state.oh.us
X-MSMail-Priority: Normal
X-Priority: 3
Newsgroups: borland.public.jbuilder.java.swing
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211