Simple question, answer quick!!1 please!!1 thanks!

i want to take the "yearselect, genderselect, and stateselect" objects and put them into their own arraylists. but i cant get them out of the class and into the other class. i probably sound like an idiot, but im new to progrmaming.
public class MyActionListener implements ActionListener
       public void actionPerformed(ActionEvent evt)
           JComboBox yearcombo = (JComboBox)evt.getSource();
            // Get the new item
           Object yearselect = yearcombo.getSelectedItem();
           JComboBox gendercombo = (JComboBox)evt.getSource();
            // Get the new item
           Object genderselect = gendercombo.getSelectedItem();
         JComboBox statecombo = (JComboBox)evt.getSource();
            // Get the new item
           Object stateselect = statecombo.getSelectedItem();
  }ADDED TOO
public class ButtonListener implements ActionListener
      public void actionPerformed (ActionEvent event)
        if (event.getSource() == save)
firststring = first.getText();
            firsta.add(i,firststring);
            laststring = last.getText();
            lasta.add(i,laststring);
             try{
            agestring = age.getText();
            ageint = Integer.parseInt(agestring);
             }catch (Exception e){//Catch exception if any
      System.out.println("Error: Numbers only....");
            agea.add(i,ageint);
            streetstring = street.getText();
            streeta.add(i,streetstring);
            citystring = city.getText();
            citya.add(i,citystring);
            System.out.println(firsta.get(i));
            i++;
}

Are you saying that you want to extract details from the comboboxes in the MYActionListener class and pass them to the ButtonListener class? If yes then I suggest you sit back and rethink your strategy as it smells a lot like bad design.
Also, do not mark your post as "Urgent, quick, drop everything you are doing and give me an answer because I am more important than you and you are all my slaves". That just pisses people off.

Similar Messages

  • HT5312 I do not remember the security answer apple ID.Please help.Thanks you!

    I do not remember the security answer apple ID.Please help.Thanks you!

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then steps 1 to 5 on the page that you posted from should let you reset them : go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account, then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the page that you posted from to add a rescue email address for potential future use

  • Why does this site have online chat when you can never actually chat - always "not available"?  I was trying to get a simple question answered without calling and being on hold for 10 minutes?

    Why does this site have online chat when you can never actually chat - always "not available"?  I was trying to get a simple question answered without calling and being on hold for 10 minutes?

        Hello flabucki,
    Help is just a post away for you my friend! I can help with your questions right here. May I ask what question do you have? Both myself and the community would love to assist in any way that we can.
    Thank you…
    ArnettH_VZW
    Follow us on Twitter @VZWSupport

  • I forgot security question answer can you please reset my answer

    I forgot security question answer can you please reset my answer
    <Email Edited by Host>

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    Nobody on these boards can arrange for a rescue email to be sent to you. They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (108254)

  • Simple question, but can  you please help?

    i'm just getting into fooling around with Java on my PC, and i'm
    having some problems running this demo class that i created through one of the online tutorials. when i attempt to run it, i
    use:
    java -classpath c:\jhikel\divelog divelog.DiveLog
    but it give me an error:
    Exception in thread "main" java.lang.NoClassDefFoundError: divelog/DiveLog
    i am using the correct classpath for this class -- it is a simple class
    DiveLog in the divelog package that i created. can anyone help me out?
    thanks

    If the path structure is c:\jhikel\divelog\DiveLog.class and the package statement in DiveLog.java is
    "package divelog;"
    Then the classpath should be .;c:\jhikel
    because Java combines the classpath and the package to created a pointer to the DiveLog.class file.

  • Question - I need feedback please.  Thank you

    I bought a R150 itunes card but now I can't redeem it as it tells me the currency is incorrect it can only be redeemed in a South African storefront. How do I get accses to a South African storefront?

    You cannot, unless you are located inside the borders of South Africa and have a South African itunes account.

  • Answer to a simple question.

    I am just trying to get a simple question answered.  I don't want to go into a discussion.  I just want to ask for help.  How do I download files to an existing folder?  I was able to do this up until today and now I am having problems.  Please help,

    Download what?  From where?  Using what software?  On What operating system?
    If you don't want a discussion, then you need to provide all information.

  • Current Year and current month?simple question

    How can i get four Digit current Year and two digit current month. So if is march it should get me as 03 and the Year as 2002. Please do help me, is a simple question isn't it ?. Thanks for your earliest response.
    Thank you.

    i have a directory structre of the format
    REPTS2000209/E200209-98000001
    in which 2002 is current YEAR
    09 is current month
    and 9800001 is the code i would submit(list box) from a form
    so what i need is a program that can generate the above path and open that particular PDF file
    so basically E200209-98000001.pdf is the PDF file.
    i am submitting it from JSP page. PLEASE HELP ME how can i program.

  • Simple Question-Deleting Finder Prefs

    I have not been able to shut my macbook down properly. I keep getting the message that "Logout has timed out because Application 'Finder' failed to quit." Someone on the discussion boards suggested deleting the finder prefs and listed:
    "Your Account/library/preferences/com.apple.finder.plist"
    "Your Account/library/preferences/com.sidebarlists.plist"
    Following these changes, it was suggested to relaunch the Finder through Force Quit window ...
    an to then try logging out ...
    My question is how to delete the Finder preferences listed above. I have tried and can not figure it out. Sorry for the simple question. Appreciate the help. Thanks.

    Open a Finder window. Under PLACES in the sidebar, there should be a "home" icon with your user name. Click in that. That's "Your Account" from your post.
    Now find the folder called "Library." Double-click on it.
    Now find "Preferences." Double-click on it.
    Now find the file called "com.apple.finder.plist" and drag it to the Trash. Do the same with the other file. Empty the Trash.
    Then go to the Apple menu and select Force Quit... Select Finder and click on Relaunch button.

  • Reading Files (simple question)

    I'm doing some homework (and no, I'm not just looking for a handout answer, I just need a simple question answered) and I was wondering about how to read a word and evaluate if the word is the same as another word. I want to do this from a .txt file using the Scanner. I know I have to read the file and use while(ifp.hasNext()) but how do I evaluate it word by word? If there's anything else you need or if I'm asking the wrong question, let me know.

    Is there any other way to read through a file other than nextLine? I know there's probably a simpler answer, but the only way I could think of doing it is storing the next line as a String and trying to find the specified word in the string. Not only am I not sure how to do that, I imagine there's a better way. Should I be evaluating it a different way?
    Edit: I was looking at the javadoc on the Scanner class and I saw the findInLine method. We definitely didn't use this in our class, but is that what I should use?
    Edited by: Mikola7 on Nov 5, 2007 4:14 PM
    Edited by: Mikola7 on Nov 5, 2007 4:16 PM

  • This is a very simple question,but I don't know.Please me.Thank you!

    I am a Chinese student in a university.I have a very simple question to ask.
    I have writed a EJB module,and I have deployed to Weblogic8.1 successfully.
    1.Now I want to write a client program.Is it necessary that the client program is packaged in the EJB package.For example ,the EJB package is Beans,is "package Beans " or "import Beans.*" necessary in my client program.
    2.If I only know the EJB interfaces,that means the EJB module is writed by other programer.I want to know how I can write the client program.How can I call EJB module's method writed by other programer.Could you give me a simple example?
    Thank you very much.

    I have writed a EJB module,and I have deployed to
    Weblogic8.1 successfully.:-)
    1.Now I want to write a client program.Is it
    necessary that the client program is packaged in the
    EJB package.For example ,the EJB package is Beans,is
    "package Beans " or "import Beans.*" necessary in my
    client program.You need not package your client with the EJB. It can be a JSP/servlet or a stand-alone application.
    2.If I only know the EJB interfaces,that means the
    EJB module is writed by other programer.I want to
    know how I can write the client program.How can I
    call EJB module's method writed by other
    programer.Could you give me a simple example?
    import java.util.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    import examples.*;
    class TestEJBHello {
        public static void main(String[] args) {
            Context context   = null;
            Object object     = null;
            // Hashtable for environment properties.
            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            env.put(Context.PROVIDER_URL, "t3://localhost:7001");
            HelloHome home            = null;
            HelloWorld hello          = null;
            try {
                context     = new InitialContext(env);
                object      = context.lookup("HelloWorldTest");
                System.out.println(" JNDI Looked up >>> " +object);
                home        = (HelloHome)PortableRemoteObject.narrow(object, HelloHome.class);
                hello       = home.create();
                System.out.println(hello.hello());
            } catch(Exception e) {
                e.printStackTrace();
            } finally {
                close(context);        // Closes the initial context.
        private static void close(Context context) {
            try {
                context.close();
                System.out.println("*** Context closed. ***");
            } catch (NamingException namingException) {
                namingException.printStackTrace();
            } catch(Exception exception) {
                exception.printStackTrace();
    }Here's a sample client app code I use for a HelloWorld EJB. You need to have a EJB client JAR containing the home and remote interfaces in the classpath during compile time and runtime.
    x

  • I forget the answer of questions of my account please send my answers thank you

    I forget the answer of questions of my account please send my answers at my email to enjoy it
    thank you
    <Email Edited by Host>

    I'm referring to your initial post above. You had included your ID as well as your password. Hopefully the hosts removed it before other people were able to steal it.

  • I can not purchase from within the application clash of clans where necessary to answer the security questions that forgot their answers please help thank you

    I can not purchase from within the application clash of clans where necessary to answer the security questions that forgot their answers please help thank you

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps : https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • TS1424 i forgot provide recure email andsecurity questions and answers. Could you sent it again please?thanks

    i forgot provide recure email ,security questions and answers. Could you sent it again please?thanks
    <Email Edited by Host>

    Not going to happen from here. We are users, not Apple. You need to change your rescue email address in your own Apple ID.
    The Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    An alternative to using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • HT5312 I have forgotten the answers to my Security questions, would you kindly please reset them. Thank-You

    I have forgotten the answers to my Security questions, would you kindly please reset them. Thank-You

    These are user-to-user forums, you are not talking to Apple here.
    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address then see if the instructions on this user tip helps : https://discussions.apple.com/docs/DOC-4551

Maybe you are looking for

  • Time Dimension Population with ODI 11.1.1.5

    Hi All, I am planning to build a time/Date dimension to use with the HR Fact tables (sourced from Oracle HRMS). Customer would like to supply start and end dates (01-JAN-05 TO 31-DEC-11) and i should be able to generate and load the time data between

  • Help: commandLink does not work.

    commandLink does not work. It just simple refreshes the page, and not enter the Listener,( he listener work pretty well in other page). Is it dataTable problem? If I not use dataTable but just use JSTL & JSF commandLink and it works fine. -----------

  • INVALID RESPONSE CODE 301

    Hi Techie's.. In a webdynpro application I have used a Web Service model to get backend data; we have a cluster environment in Test (two server nodes linked with load balancing server and a sap dispatcher). Using visual administrator --> web services

  • Controlling external information using cue points

    Hello, I am trying to change information on my site using cue points in my video.  My video is in a flash quiz and I am trying to change my objects such as an ad or photo with these cue points.  In otherwords, when a video begins, or when a cue point

  • Max_cells_one_index

    Dear All, Have you got any idea about how to calculate max_cells_one_index? As a BIA parameter it is set to 125000000 (3.000.000 as default ). However, running  a query to extract a large volume of the data leads to an error like below. "The followin