Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / January 2006

Tip: Looking for answers? Try searching our database.

2 JLists into 1

Thread view: 
bonna.choi@gmail.com - 27 Jan 2006 01:28 GMT
Hello,

I haven't done java for a while, but trying to refresh memories... I am
trying to move selected multiple values in 2 JLists that contains
different items into the 3rd JList.

For instance, if I select 'apple' from 1st JList, 'kiwi' and 'banana'
from 2nd JList, then move them into 3rd JList and it contains apple,
kiwi and banana as its contents.

Now, I can move either 'apple' or 'kiwi, banana' into the 3rd JList.
But what I want is having all 3 of them into the 3rd JList...

Can someone please give me any idea how to do this...?

Thank you in advance..
Bonna Choi  myideaoforder@yahoo.com
zero - 27 Jan 2006 19:19 GMT
bonna.choi@gmail.com wrote in news:1138325290.583397.105060
@z14g2000cwz.googlegroups.com:

> Hello,
>
[quoted text clipped - 13 lines]
> Thank you in advance..
> Bonna Choi  myideaoforder@yahoo.com

easiest would be to iterate over each ListModel (JList:getModel(),
ListModel:getSize() and ListModel:getElementAt()) and add them to the model
of the third JList (DefaultListModel:add())


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.