🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Please Help ME...(Problem about JList & JCombobox)

#10189
From: ERic
Date: Fri, 05 Nov 1999 00:00
26 lines
1120 bytes
My problem is:

When in AWT, I can use "list.add()" or "list.addItem()" to add data
items to my list ONE by ONE,
buy, within Swing, I can't find the method that allow me to add data
item one by one tomy JList or
JCombobox???

...
JList jList1 = new JList();
..

for (i = 0; i < Student_Name.length; i++) {
    jList1.add( Student_Name[i]);
   ^^^^^^^^^^^^^
}
....

Because the content of  Student_Name[] is not fixed, so I can't use "
new JList(Student_Name[])" to
do this,  I have to add the data item one by one.....


PLEASE HELP ME............. THANKS SO MUCH!!!

ERic
Technical Details
Message-ID: <3822B46C.BCC06F27@usa.net>
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,5598d06099a399b3,start
X-Google-Attributes: gid111d45,public
From: ERic <eric.yu@usa.net>
Subject: Please Help ME...(Problem about JList & JCombobox)
Date: 1999/11/05
Message-ID: <3822B46C.BCC06F27@usa.net>
X-Deja-AN: 544761553
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing