Selecting and copying words from list to textfield

I am trying to copy words from a list into a text field. I want to be able to select one word at a time, from the list, and have them create a sentence in the text field ie: you build up the sentence one word at a time. I have tried to code this (See code below) but you have to select all the words in one go and then copy them, you can't copy them over individually. Also the words rearrange themselves so that they are in the same order they were in, in the list. Any help would be most appreciated.
Thanks in advance
Jes
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
//<applet code="MyList.class" width=400 height=300></applet>
public class MyList extends Applet implements ActionListener {     
private List wordList, copyList;
private Button copy;     
private TextField answer;     
public MyList(){     
public void init()     {     
wordList = new List (5, true);
copy = new Button ("Copy >>>");
answer = new TextField (30);     
copy.addActionListener(this);
wordList.addItem("say");
wordList.addItem("Oranges");     
wordList.addItem("St.");     
wordList.addItem("Lemons");     
wordList.addItem("bells");     
wordList.addItem("and");     
wordList.addItem("Clements");     
wordList.addItem("the");     
wordList.addItem("of");
add (wordList);          
add (copy);          
add (answer);     
public void actionPerformed (ActionEvent e)     {
String[] words = wordList.getSelectedItems();
StringBuffer sentence = new StringBuffer();     
for (int ii = 0; ii < words.length; ii++) {     
sentence.append(words[ii]+" ");}          
answer.setText(sentence.toString());     

I'm a tad confused with your question. Do you NOT want multiple selection, or do you?

Similar Messages

  • ADF 11g can not select and copy data from cell of readonly table in IE

    hi,
    In ADF 11g, when render view object as readonly table with Single RowsSelection, using IE browser can not select and copy data from the cell, but it work in firefox.
    is it a bug?
    Edited by: kent2066 on 2009-5-18 上午8:46

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • Is It Possible To Select And Copy Text From A PDF Document ?

    Occasionally I would like to copy and paste text from .pdf documents.
    I have not found any way of doing it - is it impossible ?
    If it can be done - how ?
    Ian.

    Well, first off, if the problem pdf was made from a web page, then the text on that web page probably wasn't built as html text. But that's not your problem. As for the pdf itself, you have a couple options, although neither of them are as good as being able to copy/paste the real text.
    1) Use a screengrab (Cmd-Shft-4) of the text you want. This will create a .png file on your desktop of the area you selected. You may be able to insert this into Appleworks, although by nature it will still be a lo-res image, which won't print that great. May still be better than what you got originally. If you can't insert the .png, you can open it in Preview and save it in another format.
    2) If available, you could open the problem pdf in Illustrator or Photoshop, see if that works better. Some pdfs, depending on where they originate, can be text-editable when opened in Illustrator (although the fonts used must be installed on your Mac to show up correctly).
    Finally, if you like, you could email me the pdf or URL and I could take a look at it to see what I can do to help.

  • Not able to select and copy from adf table in IE and chrome if we enable row selection

    Hi All,
    We have an adf table and user wants to select and copy table cell values.
    We enabled row selection on adf table. Ifrow selection is in place, IE and Chrome are not allowing user to select and copy data. But Firefox is allowing.
    Do we have any solution to this? For our customer IE is the standard browser and they do test app on IE.
    Regards
    PavanKumar

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • Copy item from List A to List B, generate 2 rows in List B

    Hi, 
    I would like to copy and update items from List A to List B. However, I want the item to be duplicated in List B.
    I will explain my scenario
    - List A contains a People Picker column of multiple selection and a Title column
    - When the form is submitted, a workflow should trigger to copy the item to List B. If the People Picker column contains 2 values inside it, for example, user1;user2. The copied item should be duplicated in rows according to the number of users.
    Example
    Columns   Title, Users, ID
    List A - TicketNo1, User1; User2, 1
    List B - TicketNo1, User1              1
    List B - TicketNo1, User2              1
    Can this be done OOTB or must we use some event receiver..has anyone ever done such a thing before?

    Hi,
    Below code help you to accomplish your task using event receiver
    public
    override void ItemAdded(SPItemEventProperties properties)
    //base.ItemAdded(properties);
    if (properties.ListTitle ==
    "ListA")
    SPUser user = null;
    //get value of fields
    string strTitle = Convert.ToString(properties.ListItem["Title"]);
    SPFieldUser userField = (SPFieldUser)properties.ListItem.Fields.GetField("TaskAssignUser");
    SPFieldUserValueCollection fieldcollectionValue = (SPFieldUserValueCollection)userField.GetFieldValue(Convert.ToString(properties.ListItem["TaskAssignUser"]));
    foreach (SPFieldUserValue fieldValue
    in fieldcollectionValue)
                       user = fieldValue.User;
                       //Create items in another list
    SPList destinationList = properties.Web.Lists["ListB"];
    SPListItem targetItem = destinationList.Items.Add();
                       targetItem["Title"] = strTitle;
                       targetItem["WorkAssigned"] = user;
                       targetItem.Update();
    Thank You,
    Somnath Matere

  • How to find the ocuurence of a word from LIST A in LIST B in a text file?

    Hey if you look at the text file there is LIST A and LIST B.. i need to find the ocuurence of a word from LIST A in LIST B. Eg: if my output is (1,3)
    then first word from LIST A occurs in 3 places in LIST B.
    Can you please get the sample code to do this process.
    Please let me know..
    My text file looks like this below :
    phrases.txt
    LIST A
    aamsz
    abaffiliate
    aboard casino
    above computer
    above pop
    above violat
    LIST B
    http://209.153.231.131
    HTTP/1.0 200 OK
    Server: Microsoft-IIS/5.0
    Date: Mon, 02 Feb 2004 11:53:26 GMT
    IISExport: This web site was exported using IIS Export v2.2
    IISExport: This web site was exported using IIS Export v2.2
    Content-Length: 274
    Content-Type: text/html
    Set-Cookie: ASPSESSIONIDSSDBBBAR=OOGFKOJBMKMDCGPIHPADALHB; path=/
    aboard casino
    Cache-control: private
    abaffiliate
    above computer

    The key difference is that Vector is synchronized whilst ArrayList is not. Synchronized means that the classes methods can safely be accessed by different threads and as your application will not be multithreaded then the ArrayList is possibly the better option.
    To store Strings in an ArrayList, you first need to declare the ArrayList object something like this;
    ArrayList<String> listAList = new ArrayList<String>();and you would obviously do something similar for the ArrayList that will hold the Strings that should belong to List B.
    The first thing to note is that you can use the new (well new in version 1.5 anyway) generics techniques to specify the type of the object the ArrayList will hold; Strings in this case.
    To add a value into the ArrayList once you have read it from the file and decided if it belongs in the List A or List B ArrayList, all you need to do is call the add() method of the ArrayList something like this;
    // Assume that you read the line from the file into a variable called temp;
    listAList.add(temp);To compare the two lists, the easiest option would be to iterate through one ArrayList and ceheck to see if the values you recover from it are duplicated in the other ArrayList. Luckilly, ArrayList has another method that helps here, it is called contains();
    Assuming that you have two ArrayList(s), one called listAList that holds the Strings that belong to List A and another called listBList that holds the Strings that belong to ListB, you could do something like this to check for duplicates;
    for(String element : listAList) {
        if(listBList.contains(element)) {
            System.out.println("Found a match");
    }Hope that helps.

  • I have problem with selecting and Copying is some of the applications

    I am using  blackberry passport.  I would like to know how to select text and  copy text from pages of YouVersion Bible.  When I was using blackberry bold 9790 it was simple but now I am using blackbery passport I have failed to know how to perform that task.

    While the content of many books, including the Bible have no copyright, the effort that the developer has gone through to be able to present it in an app could be. Not saying it is, I have encountered apps where I think the developer in advertently turned off features such as resize or copy. 
    Paul
    Torch 9810; PlayBook 64g; iPad1 64g; iPad2 64g; iPhone6 64g Passport
    Provider Bell (tablets all WiFi)

  • HT2688 Working on a single computer with multiple users, I have set things up to allow each user to view and listen to the others' music libraries under the "Shared Library" function.  Can you then connect an iPod touch and copy music from a shared librar

    Working on a single computer with multiple users, I have set things up to allow each user to view and listen to the others' music libraries under the "Shared Library" function.  Can you then connect an iPod touch and copy music from a shared library?

    Was your wife logged into the libray at the time you tried to log in? I have had a similar problem and it was because another user was logged into the library when I attempted to. I got the permission denied banner.

  • Problem selecting and copying items

    I use my iPad Air to work on groups in the photo sharing site, flickr.  Since installing IOS8 I am having extreme difficulty in selecting and copying awards.  Selection is done by dragging through the html, and then clicking on a blue icon "COPY"  Sometimes the code saves correctly, sometimes it doesn't, sometimes it changes to code previously saved  It is driving me nuts.  Can anyone help.
    I have tried restarting the iPad, but that didn't help.

    Thanks Mark, but you answered what I already included within my question. I wrote "So it's that, or disabling the hyperlink, move the object normally, and putting the hyperlink on again"
    With that, to "Uncheck the "Make hyperlinks active" you need to first select the object, and you end up back to the first and second problem I wrote.

  • Why can't I select and drag addresses from contacts to mail

    Why can't I select and drag addresses from contacts to mail

    Re: can't drag email addresses from contact list

  • How to select and copy more than one field in SMARTFORMS

    Hello, I have about 60 fields in my smartforms, I need to copy them and paste once more at the same page. There is a problem, I can not select and copy more than one field. Is there some trick to copy and paste more than one element simultanicly?

    Hi,
    There is no way to copy multiple elements in smartform.
    you have to do one by one only

  • How do I add/copy songs from iTunes 11 to my iPod Classic and copy playlist from iTunes 11 to my iPod? It was easy to do in earlier versions of iTunes, but now I can not figure out how to do it.

    How do I add/copy songs from iTunes 11 to my iPod Classic and copy playlist from iTunes 11 to my iPod? It was easy to do in earlier versions of iTunes, but now I can not figure out how to do it.

    How do I add a new playlist to my ipod using iTunes 11? - https://discussions.apple.com/thread/4577843

  • If i am making an app, and copy something from a site that may is copyrighted and make money on it will that be illigal ?

    If i am making an app, and copy something from a site that may is copyrighted and make money on it will that be illigal ?
    Just like 10 best jokes etc.

    That would be a copyright violation.
    If Apple requests it, you have to be able to show documentation that shows you have the right to use the content in your app.

  • What I have to configure in my pc �so I can selecting and copy the ja

    Before i could copy the content of my java console with selecting it and pressing ctrl + c...but now�I can�t :(
    What I have to configure in my pc ...so I can selecting and copy the java console content in a text file?
    Thanks in advance
    Mary

    Excuse me....but i don't have success in that....
    I am using win 2000 server
    jdk 1.4.1.01
    java plug in 1.4.1.01
    I can open the java console.....
    if i select the text and press right clic ....i don't obtain any menus.....
    if i give clic in the title bar (of my java console) i obtain a menu wiht the following obtions:
    Mover
    Tama�o
    Minimizar
    Maximizar
    Cerrar Alt+F4
    And ctrol+c doesn't working.....
    Select the text and press enter...and in the text editor press control+v...and i dont obtain nothing.....:(
    Some ideas or suggestions please?.....
    Thnaks in advance....
    Mary

  • Just downgraded back to iTunes 10.7 and copied music from ipod classic to itunes using houdini, but how do i copy the playlists from the ipod when itunes says that my ipod has been synced to another itunes library?

    Just downgraded back to iTunes 10.7 and copied music from ipod classic to itunes using houdini, but how do i copy the playlists from the ipod when itunes says that my ipod has been synced to another itunes library?

    Thank you again for all of your help!! I really appreciate it!
    I think I am following -- I was able to upload to my iPhoto and all photos and videos are there that is a plus! I tried to create an Event in my iPhoto and put all of my photos in that event but for some reason, now my iTunes it not recognizing that Event in my iPhoto. It is not allowing me to import just that event at the moment but I may be doing something wrong. At least all of my pics and vids are in iPhoto so that is a plus and I know they are at least saved somewhere. Just for some reason, my iTunes it not locating the event that I created with only those photos.
    Thank you for letting me know about my contacts! How do I know if I have the contacts app?
    Also, I had no clue that my iCloud could be backed up via cellular data! However, is this a new feature with the most updated iOS?? Unforutnatly I am like 2 iOS updates behind because I don't have enough storage on my phone. I still get the notification that my phone needs to be plugged in and connected to wifi in order to back up to the cloud :-(
    How can I sync using USB? Right now when i click on the info tab for my iPhone in my iTunes this is the answer that I get -- I am a little unclear as to what it means.
    Sync Contacts:
    Your contacts are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone
    Sync Calendars:
    Your calendars are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone

Maybe you are looking for

  • Need to fetch  change number for tcode IA06

    Can anyone please tell me how do I fetch the change number (Aennr) in case of tasklist chage? Tcode IA06? I am using FM CP_EX_PLAN_READ which returs me change number..but it is not populated.... Plz help.

  • How to add a table(from TableRenderDemo) to a JFrame again

    Hello again: Thanks for stephen andrews's adivice, I follow your adivice to add code (it is in EventHandeler of DrawCalendar class, and they indicated by ???????????), but it still not work, please check for me why, Thanks. My problem Please run my c

  • .jsp works in ROOT but not separate web

    I am very new to JSP but I am running the Java runtime on a Unix           REDHAT machine and I am using Apache Tomcat. I have the $TOMCAT_HOME           defined and the usual helloworld.jsp will run at           $TOMCAT_HOME/webapps/ROOT but not at

  • Multi Language support in applications

    Hi, I am working with an application which need to support langs like Japanese, French, Sweedish, Thai etc. Requirement is: user enters the text in his local lang from the keyboard then we need to store that into Oracle DB and display it on UI (JSPs)

  • How to protect my iphone from scratched

    How to protect my iphone from scratched