πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.gui
Article #130

Re: TOO SLOW list.add(element) OR choice.add(element)

#130
From: Bret Ewin
Date: Fri, 29 Jan 1999 00:00
20 lines
1642 bytes
How about implementing your own Model class that doesn't send update
events until you tell it to? Maybe a setNotifyListeners(boolean) method?

Bret


Luis Miguel Crespo PοΏ½rez wrote:

> I find to slow adding strings to lists and choices, if I try:
>     for (int i = 0; i < 1000; i++)
>         list.add("Element " + i);
> this takes for ever, and even worse, the list starts scrolling up
> and down while adding elements.
>
> This also happens to Choice components.
>
> Is there a way to avoid it ?
>
> If so, please send an ansawer to:
>     lmc@sdsoftware.es
Technical Details
Message-ID: <36B1DE53.11136807@maincontrol.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36B091E6.C92DC76F@sdsoftware.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10fd6d,eac07156a46eb363
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: 113ae9,eac07156a46eb363
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 115d3b,eac07156a46eb363
X-Google-Attributes: gid115d3b,public
X-Google-Thread: 10a146,eac07156a46eb363
X-Google-Attributes: gid10a146,public
X-Google-Thread: 1116f3,eac07156a46eb363
X-Google-Attributes: gid1116f3,public
From: Bret Ewin <ewin@maincontrol.com>
Subject: Re: TOO SLOW list.add(element) OR choice.add(element)
Date: 1999/01/29
Message-ID: <36B1DE53.11136807@maincontrol.com>
X-Deja-AN: 438376035
Content-Transfer-Encoding: 8bit
References: <36B091E6.C92DC76F@sdsoftware.es>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@rcn.com
X-Trace: dUc9YC8xuLRG/tDW815xOkPa6A0npAP/AwO9H3TZoJ8=
Mime-Version: 1.0
NNTP-Posting-Date: 29 Jan 1999 16:16:52 GMT
Newsgroups: comp.lang.java.gui,es.comp.lenguajes.java,comp.lang.java.programmer,comp.lang.java.security,comp.lang.java.help