🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Null pointer exception for JList-derived class

#9678
From: janene_r_mccrillis
Date: Tue, 15 Feb 2000 00:00
28 lines
1666 bytes
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: <88c4fu$nte$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <889tfc$6bo$1@nnrp1.deja.com> <38a87c52.0@news.dot.state.oh.us>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,36010c081a23917d
X-Google-Attributes: gid111d45,public
From: janene_r_mccrillis@my-deja.com
Subject: Re: Null pointer exception for JList-derived class
Date: 2000/02/15
Message-ID: <88c4fu$nte$1@nnrp1.deja.com>
X-Deja-AN: 586026412
References: <889tfc$6bo$1@nnrp1.deja.com> <38a87c52.0@news.dot.state.oh.us>
X-Http-Proxy: 1.0 x26.deja.com:80 (Squid/1.1.22) for client 204.68.140.35
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Tue Feb 15 18:04:49 2000 GMT
X-MyDeja-Info: XMYDJUIDjanene_r_mccrillis
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.61 [en] (WinNT; U)