🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18941

Re: Delphi Assign equivalant for JBuilder

#18941
From: Paul Furbacher
Date: Sat, 28 Mar 1998 00:00
25 lines
1472 bytes
Chris Lively wrote:

> I have an AWT choice control that I'm loading with anywhere from 200 to
> 400 values.  Actually, there are 12 of them.  After loading the first
> one, I would like to be able to replicate this information to the
> remaining controls.  Anyone know of a quick way of doing this?

I'm assuming that "replicate this information" means
making copies of the string list in the first choice
control. 

Instead of using the AWT Choice component, use
the JBCL ChoiceControl.  Use the following outline
to replicate the list info:

  String [] sourceItems = choiceControl1.getItems();
  String [] itemsCopy = new String[sourceItemss.length];
  System.arraycopy(sourceItems, 0, itemsCopy, 0, itemsCopy.length);
  choiceControl2.setItems(itemsCopy);

You can provide the loop, the instantiation of the 
12 choice controls, etc.

Paul Furbacher
Technical Details
Message-ID: <351CCA72.38B3@bilbo.bio.purdue.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <351304BA.3281A880@intelemedia.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,7b9c4f2637242622
X-Google-Attributes: gidf74b3,public
From: Paul Furbacher <pf@bilbo.bio.purdue.edu>
Subject: Re: Delphi Assign equivalant for JBuilder
Date: 1998/03/28
Message-ID: <351CCA72.38B3@bilbo.bio.purdue.edu>
X-Deja-AN: 338585286
Content-Transfer-Encoding: 7bit
References: <351304BA.3281A880@intelemedia.com>
Mime-Version: 1.0
Reply-To: pf@bilbo.bio.purdue.edu
Content-Type: text/plain; charset=us-ascii
Organization: Biological Sciences, Purdue Univ.
Newsgroups: borland.public.jbuilder.java.language