πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #26197

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

#26197
From: Jonathan Revusky
Date: Thu, 28 Jan 1999 00:00
23 lines
1315 bytes

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 ?

Agrega las cadenas *antes* de mostrar el componente en pantalla.


Jonathan Revusky
-- 
Java and Delphi Consulting
Make your .class files double-clickable
with SmartJ
http://www.bigfoot.com/~crystalline.solutions
Technical Details
Message-ID: <36B0CF9F.B6919CD1@jet.es>
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: 1116f3,eac07156a46eb363
X-Google-Attributes: gid1116f3,public
From: Jonathan Revusky <jrevusky@jet.es>
Subject: Re: TOO SLOW list.add(element) OR choice.add(element)
Date: 1999/01/28
Message-ID: <36B0CF9F.B6919CD1@jet.es>
X-Deja-AN: 438077364
Content-Transfer-Encoding: 8bit
References: <36B091E6.C92DC76F@sdsoftware.es>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: usenet@lola.ctv.es
X-Trace: lola.ctv.es 917557657 10730 195.55.156.110 (28 Jan 1999 21:07:37 GMT)
Organization: CTV/JET
Mime-Version: 1.0
Reply-To: jrevusky@bigfoot.com
NNTP-Posting-Date: 28 Jan 1999 21:07:37 GMT
Newsgroups: es.comp.lenguajes.java