🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JList only showing one selection

#7987
From: Joi Ellis [TeamB]
Date: Sat, 04 Nov 2000 00:00
22 lines
1425 bytes
Kevin Dwan <kevin@blueberry.com> wrote:

> Thanks, Joi. That did it.

> Do you have a suggestion for clearing the JList, so that if the user changes the
> selection, the old values get zapped?

> I thought JList1.clearSelection would do it, but it does not.

Isn't this from a JFileChooser?  The user will have already made and unmade
whatever selections they wish.  It isn't until they press <ok> or whatever
you named the accept button that the getSelectedFiles() method will return
anything.

JList1 is your own copy of the data list, it isn't the same list as the
user is seeing embedded within the JFileChooser.  You can do anything you like
to JList1 and it won't affect the JFileChooser.

-- 
Joi Ellis (TeamB) 
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Technical Details
Message-ID: <8tvor2$dfj4@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3A021239.92AF1FD4@blueberry.com> <8tt9hf$kml3@bornews.borland.com> <3A0363E0.2BF1797E@blueberry.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,34638f00403429f8
X-Google-Attributes: gid111d45,public
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: JList only showing one selection
Date: 2000/11/04
Message-ID: <8tvor2$dfj4@bornews.borland.com>
X-Deja-AN: 689451924
References: <3A021239.92AF1FD4@blueberry.com> <8tt9hf$kml3@bornews.borland.com> <3A0363E0.2BF1797E@blueberry.com>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.swing