How do you append an ArrayList to another ArrayListt

Hi,
Basically I have two Arraylist and I want to append one on to the end of another?
Any idea how to do this in Java in Python you just use the append function.. Cant find anything like this in Java though....

david_david wrote:
baskaraninfo wrote:
list1.addAll(Arrays.asList(list2.toArray()));Why don't use
list1.addAll(list2);Edited by: david_david on Jan 31, 2008 12:16 PMIndeed. That initial line where an array is converted to an array only to convert it back to a list reminds me of a gesture a student of mine taught me. He was Iranian, so I wonder if this is an Iranian gesture or just one of his own devising. It goes like this:
+"Instead of doing this (tug left ear lobe with right hand, in the obvious way) you are doing this (awkwardly reach right arm across top of head and try to tug on left earlobe, again)."+

Similar Messages

  • How do you incorporate an ArrayList inside a ComboBox (GUI Project Help)?

    Basically, I created a project around NBA Greats of Our Past. There is around 76 players so rather than typing all of them up in JCreator, how can you use an Arraylist to make things easier. I already created the spreadsheet on Excel with all the names. But the problem is that I don't know how to use them inside my ComboBox.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ComboBoxDemo extends JFrame {
         private String[] nbaGreats = {"Michael Jordan"};
         private ImageIcon[] nbaImage = {
              new ImageIcon("H:/jordan.jpeg")
         private String[] nbaDescription = new String[1];
         private DescriptionPanel descriptionPanel = new DescriptionPanel();
         private JComboBox jcbo = new JComboBox(nbaGreats);
         public static void main(String[] args)
              ComboBoxDemo frame = new ComboBoxDemo();
              frame.pack();
              frame.setTitle("NBA Greats");
              frame.setLocationRelativeTo(null);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
         public ComboBoxDemo() {
              nbaDescription[0] = "(Included Yet, Description not Included Yet";
              setDisplay(0);
              add(jcbo, BorderLayout.NORTH);
              add(descriptionPanel, BorderLayout.CENTER);
              jcbo.addItemListener(new ItemListener() {
                   public void itemStateChanged(ItemEvent e) {
                        setDisplay(jcbo.getSelectedIndex());
         public void setDisplay(int index) {
              descriptionPanel.setTitle(nbaGreats[index]);
              descriptionPanel.setImageIcon(nbaImage[index]);
              descriptionPanel.setDescription(nbaDescription[index]);
                   I Included a picture for reference. [http://img442.imageshack.us/i/98328443.png/]
    Edited by: lilazndood1 on May 28, 2010 6:50 AM

    Its a working example. The tutorial examplains the code in steps.
    Any code we give you will be no different.
    but it doesn't really help me because I don't understand itIf you have a specific question about the code from the demo then maybe we can help you, but "I don't understand it" is not a question.

  • How do you make an appointment in another time zone with IOS7?

    How do you make an appointment in another time zone with IOS7?

    Not clear how you want to set them - in your time zone or "another" time zone.
    Settings > Mail, Contacts, Calendars > (scroll down to Calendars) > Time Zone Support > ON/OFF (depending on how you want it)

  • How do you call a method from  another class without extending as a parent?

    How do you call a method from another class without extending it as a parent? Is this possible?

    Why don't you just create an instance of the class?
    Car c = new Car();
    c.drive("fast");The drive method is in the car class, but as long as the method is public, you can use it anywhere.
    Is that what you were asking or am I totally misunderstanding your question?
    Jen

  • How do you insert a picture into another picture?

    How do you insert a picture into another picture.  For example, one person is missing from family photo & I'd like to insert that person's face.

    By using an external editor:
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate. You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • How do you copy the templates from another webstie and use them as your own?

    Hi Everyone, I was told that with Dreamweaver it is possible to copy another websites templates? What are the steps in copying another websites template with Dreamweaver? I would like to know I am a newbie when it comes to this program so please make your statement understandable for me, thanks. Also, I am having problems creating a drop down menu for each of my web pages. When I go to highlight a specific box on my homepage I want the dropdown menu to appear vertically and not horizontally. I may have missed something when watching the video tutorials or I didn't quite understand what they meant. Thank you for any information on the series of questions that I have asked in this new thread.

    Hi Everyone, I was told that with Dreamweaver it is possible to copy another websites templates? What are the steps in copying another websites template with Dreamweaver?
    This is difficult to understand.   How are you copying templates from another site?
    If you have all the files that make up the template, then it's only a matter of saving all the files to a folder on your hard drive and setting up a site definition pointing to this folder.  You then work on the files as usual.
    Also, I am having problems creating a drop down menu for each of my web pages. When I go to highlight a specific box on my homepage I want the dropdown menu to appear vertically and not horizontally. I may have missed something when watching the video tutorials or I didn't quite understand what they meant. Thank you for any information on the series of questions that I have asked in this new thread.
    Without seeing the page it's difficult to judge what your problem is.  If possible, please upload the files to a remote server and provide a link to the page. It's the only way people can help - if they see your page in action.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • How do you reactivate this phone in another family member name after the original owner now deceased

    How do you reactivate this phone Verizon Droid Maxx in another family member name after the original owner now deceased

    To switch it to another number, you need to activate another phone on the number you no longer need (or have Verizon cancel it for the deceased member).  Once that line is no longer active, you can activate the phone on another number - have Verizon CS at a store help you, or follow the steps on verizonwireless.com from the account of the person you do want it to be activated for.

  • TS2755 How do you turn off messaging from another device

    How do you turn off messaging from one device to another?

    Seems to be related to iChat so just set it to always allow?
    http://forums.macrumors.com/showthread.php?t=1191796
    Regards,
    Colin R.

  • How do you add your Iphone to another computer once you have already added it to a different computer.

    My home computer is no longer working. How do you addf your Iphone 4 to a different computer for updates and sync?

    Plug it in and sync it.
    It will erase the current content and replace with content from the new computer, as is the design of the iphone.
    Use your backup copy of your home computer to put everything on the new computer.

  • How do you replace one image with another

    I have a page that displays the results of a search for information about a club. One of the items is the club's logo. It is displayed using the following code
    <img src="<?php echo $row_clubedit['club_logo_url']; ?>" alt="The Club's Logo"  class="logo" title="The Club's Logo">
    This works fine, except when no club has been selected, in which case it shows the default question mark in a blue box.
    It would be nice if I could display the Federation Logo, to which all the clubs belong, until a club is picked.
    Is there a simple way to set a default image that would be replaced from a data set.
    $row_clubedit['club_logo_url'] holds the url to the log in the format http://www.club.org/clublogo.png
    <img src="<?php echo ( 'federation_logo_url'); ?>" alt="The Club's Logo"  class="logo" title="The Club'c Logo">
    The logic I suppose would be
    if club_logo_url does not exist,
              then print the  federation logo,
         else print the club logo.
    How do you code that in php?
    I'm only a beginner at PHP.

    <img src="<?php echo $row_clubedit['club_logo_url'] == "" ? "http://www.club.org/clublogo.png" : $row_clubedit['club_logo_url']; ?>" alt="The Club's Logo"  class="logo" title="The Club's Logo">
    should do it

  • How do you Append XML to an existing document?

    Hi there, I need to to append an existing XML document to a new XML document. How is this done?
    Is there an easy way of attaching one XML document to another?
    If not, do I need to parse the existing XML and add it to the new document, element by element?
    My existing XML is received as an input string and I need to include it in the new document.
    Thanks in advance
    Michael

    Hi there, I need to to append an existing XML document
    to a new XML document. How is this done?
    you can use JAXB to do this. unmarshall(), validate() and marshall() belonging to java intepretion of xml document.
    To eloborate further, say u have xml document as
    <book>
    <author>...</author>
    </book>
    JAXB helps u to get java intepretion of xml document by converting it into Book class and Author class.
    And, say u want to add new authors, u need to add Author objects to Book object and then pass Book object to marshall() method.
    The xml document will be appended with the author u added.
    Hope this helps.
    Jatin

  • How do you hyperlink a rollover to another page from within your iweb site?

    Ive made a bunch of rollovers for my iweb navigation bar. If youve created a rollover you know you have to link the images to a image hosting site. here as you would just normally drag and drop a image from your desk top. Because of the way iweb works, if you are using images from a image hosting sit, you can no longer adjust the characteristics of the images i.e. colors, size, and in this case the hyperlink. More specifically you cant change the hyperlink to a page within the iweb site.
    So the problem im trying to figure out is how to link the rollover to a page within my iweb site.
    now you can actually change the hyperlink of the rollover. however you must do this by adjusting the html within the snippet of the rollover. The problem i found is that iweb doesnt creat sub domains for each page. a entire iweb site with multible pages uses only one domain which is the homepage. so i cant just type a subdomain of another page into the snippet hyperlink because the subdomain doesnt exist.
    here is the link to my site. youll notice i did figure out a work around with the "contact us" button but its a huge pain in the butt. i had to create a new domain and a new site then attach the referal index.html to that new domain. todo this for every single button is very difficult.
    http://springgardenranch.tk
    so i guess the bigger question is, is there a easier way to do this?
    perhaps if there was a way to create a subdomains like springgardenranch.tk/contactus withing iweb for each page. but i dont even know if thats possible.
    thanks for you help.

    Because of the way iweb works, if you are using images from a image hosting sit, you can no longer adjust the characteristics of the images i.e. colors, size, and in this case the hyperlink.
    Then use  your own images. Then you can create them the way you want.
    Here's how I do it :
    http://cafenoir.atspace.com/Hover/
    And here's the menu in an iWeb page :
    http://cafenoir.atspace.com/HNBF/
    And here you can learn how to do it. Follow the links to the How-To pages.
    http://cafenoir.atspace.com/
    You may have to learn HTML. CSS, JavaScript, AJAX, DOM and how iweb creates its webpages.

  • How do you Get your mail on another computer

    I am traveling abroad. How do I get my mail from my mac account on another computer?

    Doesn't .mac have a web mail interface? Go through Safari to get it, then. Otherwise, you are going to have to write down all the Mail settings for the .mac account and configure a mail account on the other computer's Mail program

  • How do you append to a "string" type field?

    ABAPers,
    I am trying to understand how to append values to a "string" data type in an efficient way. One way to append to a string is using "concatenate" feature.
    data: myRetVal type string.
    DO
      CONCATENATE myRetVal ',' myNewData INTO myRetVal.
    ENDDO.
    However, CONCATENMATE is not efficient in this scenario. Each time you call it, myRetVal gets copied into myRetVal all over. As the string grows, this statement will execute slower and slower.
    The other option I thought is to use offset mechanism.
    MOVE myNewData to myRetVal+myRetValLen.
    However, it appears "string" and "xstring" type fields do not support offset and length operations.
    Is there a third choice that I am missing?
    Thank you in advance for your help.
    Pradeep

    There is no such operator.
    But if just using literals, you can use the &, like this.
    data: string type string.
    string = 'This is the first part ' & 'This is the second part'.
    Again, this will not work with variables.
    Regards,
    Rich Heilman

  • How do you append, or copy and paste, pages

    Hi, if I'm in a file and want to extract a few pages but not the whole file to another file, is there a quick way to do it? I know you can extract the pages to a separate file, save the file and then insert into or combine with another file but this can be time consuming.
    So is there an easy way to do it?
    Many thanks.

    Thanks again. Yes, you are right though between files it only copies and doesn't move. I'm surprised that there isn't a copy and paste function that works in this way or an append like there is with emails, as dragging and dropping can sometimes be cumbersome.
    But anyway it works so I'll have to live with the way it is.
    Cheers!

Maybe you are looking for

  • How can i insert  more clob objects into oracle9i?

    my env: os: windows server 2003 ent sp2 php:=5.2.3 oracle : 9.0.0.8 i look at this article : http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_lobs.html but ,i want insert two clob into the oracle .... Inserting a LOB To INSERT

  • Mail-routing during migration

    Hi, I am working with a migration-project where we want to move all mailbox'es from an Exchange-org in domain a.com to a new Exchange-org in a new domain b.com. The users email-addresses will be the same in the new domain as in the current domain. My

  • Generic Delta 2

    Dear Expert I have a z Table consisting fields like company code , change date, etc. I have created a generic delta using change date as delta field. A program loads data to this table. Lets say I loaded all data for company code 1000 and there are o

  • Online Backup Failed with error-BR0268E Asynchronous execution of program..

    Hi, We are using DB13 for Online backup.But from few days it failing with below error. BR0268E Asynchronous execution of program interrupted, exit status: c0000094 BR0267E Asynchronous execution of program failed BR0278E Command output of 'F:\usr\sap

  • Mix object tables with relational tables?

    Hallo, is it possible to mix object tables with relational tables in one database? I didn't succeed in assigning a foreign key from a relational table to an object table. Is this only working with column objects in relational tables?