🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Clearing a JList

#11299
From: Andy Blanchard
Date: Thu, 17 Jun 1999 00:00
16 lines
937 bytes
What's the correct procedure for removing all items from a JList?  I'm
populating the list successfully, using the following:

myList.setListData(vItems);    // where vItems is a vector

By re-calling the above code, the items are appended to the end of the list.
I also tried:

myList.setListData( (Vector) null );

This simply adds "nothing" to the end of the list, rather than replacing the
existing items.

Thanks for any help.
Andy Blanchard
ablanchard@geocities.com
Technical Details
Message-ID: <7kak6g$oos9@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a1790d240a431449,start
X-Google-Attributes: gid111d45,public
From: "Andy Blanchard" <ablanchard@geocities.com>
Subject: Clearing a JList
Date: 1999/06/17
Message-ID: <7kak6g$oos9@forums.borland.com>
X-Deja-AN: 490623284
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0