Handling more than one jcombox in actionPerformed.

HI, am having a little difficulty recognising events in the event handler. Basically, my program has two comboBoxes and a button.
so if one combobox item changes, when search is clicked, i want it to update the panel accordingly, also, if two comboboxes are selected, get the item selected of the first combobox and use it as a search criteria for the action performed in the second combobox.....
ive tried a variety of ways but this is the best i could do....
searchButton.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae) {
          createDialog(); //this method creates a jdialog and addsa textArea to the panel...
doing this causes an error:
if(event.getActionCommand()=="course"){
     String courseName = (String)coursesComboBox.getSelectedItem();
     final String newline = "\n";
     popUp.setTitle("Modules Available to "+ courseName);
     PrintModules print = new PrintModules("DissertationOntology.owl");
     ArrayList modules = print.ListModules("mod");
     int size = modules.size();
     for(int i=0;i<size;i++){
          String mod = (String)modules.get(i);
          textArea.append(mod+ newline);
whereas doing this doesn't quite capture what am trying to achieve:
if ((event.getActionCommand()=="course")&&(event.getActionCommand()=="status")) {
     createDialog();
     String courseName = (String)coursesComboBox.getSelectedItem();
     final String newline = "\n";
     popUp.setTitle("Modules Available to "+ courseName);
     PrintModules print = new PrintModules("DissertationOntology.owl");
     ArrayList modules = print.ListCompulsoryModules("mod");
     int size = modules.size();
     for(int i=0;i<size;i++){
          String mod = (String)modules.get(i);
          textArea.append(mod+ newline);
Any form of assistance would be greatly appreciated...
thanks alot

Would you please use format your code and paste it again. Use the "Formatting tips" link for details.

Similar Messages

  • How to handle more than one message coming from an async BPEL in a sync BPEL process?

    Here is the scenario,
    Sync process A is calling an Async process B and Async process B  is developed in such a way that it is returning more than one message to sync process A, how you will handle those messages in sync process A?

    As durga said, its a wrong design, you will have issues in real time. You wont get the response back most of the time. It can be otherway around, async is waiting for sync process.
    Change your design or provide what is your use case below, we can think of which design suits you.
    Thanks,
    Vijay

  • PhotoSmart 2710 Printer Feeder cannot handle more than one page at a time

     1. Product Name and Number -> Photosmart 2710 Wireless All in One Printer
     2. Operating System installed (if applicable)  -> OSX 10.6 / 10.7
     3. Error message (if any)  -> None
     4. Any changes made to your system before the issue occurred -> None
    My printer works fine except that the paper feeder has difficulty feeding more than one sheet at a time.  When I put a stack of more than one sheet of paper in the feeder tray, the printer might successfully print one or two pages, but then pages will overlap (top of printed page is on one sheet, bottom on another or multiple sheets will be grabbed at the same time so only the first sheet gets printed and the others are blank.
    I do mostly standard office paper printing so no real experience with heavier pages.  I get my paper from Office Supply stores, like Staples, and brand does not seem to make a difference.  Have had same experience with Store Brands, National paper company brands and have even used HP branded paper with same results.
    I have no problems when I manually feed individual sheets to the printer  So I have essentially a single sheet printer.  Any help appreciated.
    Thank You

    Hi there,
    This article should cover the issue you are experiencing. Give the steps outlined a shot and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Can FDM handle more than one year at a time?

    Hi,
    I'm trying to load a multi-load file through FDM with the target being an Essbase cube and the source being a text file. The file is for 36 months which crosses 3 years. The problem is Oracle support is saying FDM can only handle one calendar year at a time and we need to load 3 separate files.
    The file imports and validates ok. And the export only pushes data to the first year '2010' but it doesn't error out.
    Any ideas?

    If you use an excel file as the source, you can load all 36 periods.
    You can also modify the adaptor to support this action but I would caution you that doing so will cause support to no longer support your application without requiring you to import a non customized adaptor. This also has consequences for when upgrading.
    Let me add, FDM support is the best in the business. I have never had a situation where what they told me was incorrect. What you are trying to accomplish would be a custom solution that should be implemented by an experienced FDM resource that understands the impact of the customization.
    Edited by: TonyScalese on May 6, 2010 3:10 PM

  • XFi Can't Handle more than one sound at a time?!?

    I bought an XFi Elite Pro and it was working great. Now, however, it will only handle one sound at a time. For example, if I'm playing a song in iTunes and windows makes a sound, the itunes song cuts out, the windows sound plays, then itunes abruptly cuts back in. Same thing in games. If I'm playing Warcraft the sound will cut out if Windows makes some kind of a sound.
    How do I get my card back to being able to play multiple sounds/music simultaneously? I'm running Vista Ultimate on a Quad Core system with 4 gigs of RAM.

    Sound like something messed up somehow. Maybe you can consider reinstalling the drivers again? @28.86.2.0

  • How to handle more than one submit buttons on servlets

    Hi:
    anyone know how to handle the multiplet submit button on servlet,
    such as next, previous, add and so on.
    Thank you

    Don't worry about because only the button that is clicked will get submitted. In the servlet you just test for the existance of a parameter:
    if (request.getParamter("SubmitButton1") != null) { ..... }
    if (request.getParamter("SubmitButton2") != null) { ..... }
    Save the following HTML code, open in IE and click on the buttons to see what will get sent to the servlet:
    <html><head></head><body>
    <form method="GET">
       <input type=text name=text1>
       <input type=submit name="Submit1" value="Me">
       <input type=submit name="Submit2" value="you">
    </form>
    </body></html>

  • How to handle more than one button in a form?

    Hello Java fans,
    I am new to Servlets. I am facing a problem in java servlet. I tried to place two buttons in the form. Both buttons has to invoke different servlets. How to associate action to each button?
    Thanks in advance,
    SMVEL

    Give each button a different name so that you can check which button is clicked.
    <input type="submit" name="button1" value="Press this button to invoke servlet1">
    <input type="submit" name="button2" value="Press this button to invoke servlet2">
    Then in your controller servlet:
    if(request.getParameter("button1") != null){
    //button1 is pressed.
    //forward to servlet1.
    else if(request.getParameter("button2") != null){
    //button2 is pressed.
    //forward to servlet2.
    }

  • Macbook Pro mid 2012 starting to lag when running more than one program.

    Firstly mah specs :
    Retina, Mid 2012
    2.3 GHz Intel Core i7
    8gb 1600 MHz DDR3
    NVIDIA GeForce GT 650M / Intel HD 4000
    OS X 10.8.4 (12E55)
    So, i bought this macbook about a year and a month ago and since i bought it everything has run fine, it has always been fast and smooth, until around 2 months ago when it started getting a little laggy in handling more than one program being open. Before this i was able to run Photoshop, Cinema 4D, Second Life and Chrome all at once and recieved no speed decrease what so ever. So i figured that it must just have been a little clogged up maybe, honestly wasnt sure but tried clearing cache, tried freeing up memory with some of the mac memory management tools from the App Store and non of these worked so in the end i backed up what was important and wiped the HD and re installed the OS. Annoyingly i am still having problems, if i have Photoshop open and i am surfing chrome it lags on scrolling web pages or loading links. If i have Second Life open i seem to lag with more than 3 players around me quite badly, even if i put Second Life onto its lowest Graphic Settings i still lag where as before i had this issue i could run it on its highest Graphic Settings and recieve little to no lag what so ever. This happens for most programs that used to run smoothly, if i now open Cinema 4D and try anything else.....the system slows down.
    I COULD take this to the apple store and genuis bar and ask them to have a look at it HOWEVER i am back at Uni in 2 weeks and i need the macbook for my studies as i am currently working on a summer project and need it for research, can any of you Mac Wonders out there suggest anything else for me to try. I have checked the HD and it says its not failing and is verified and found no issues with the partition.

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    Boot into Recovery mode, launch Disk Utility, and run Repair Disk.
    If you're booting from an aftermarket SSD, see whether there's a firmware update for it.
    Otherwise, take the steps below when you notice the problem.
    Step 1
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
    Select the CPU tab of the Activity Monitor window.
    Select All Processes from the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
    Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
    Next, select the Disk Activity tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in and Writes out.)
    Step 2
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • UDO WITH MORE THAN ONE CHILD TABLE

    Hello There.
    Can I handle more than one child table for a master table by code?
    if I can, how do I create this udo, I have tryed the following code, but it takes the last child table ("jobs7")
    If oUserObjectMD.GetByKey("Jbs_UO") = 0 Then
                oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
                'oUserObjectMD.FormColumns   
                oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.FindColumns.ColumnAlias = "Code"
                oUserObjectMD.FindColumns.Add()
                oUserObjectMD.FindColumns.SetCurrentLine(1)
                oUserObjectMD.FindColumns.ColumnAlias = "Name"
                oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.LogTableName = ""
                oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.ChildTables.TableName = "JOBS1"
                oUserObjectMD.ChildTables.TableName = "JOBS2"
                oUserObjectMD.ChildTables.TableName = "JOBS3"
                oUserObjectMD.ChildTables.TableName = "JOBS4"
                oUserObjectMD.ChildTables.TableName = "JOBS5"
                oUserObjectMD.ChildTables.TableName = "JOBS6"
                oUserObjectMD.ChildTables.TableName = "JOBS7"
                oUserObjectMD.ExtensionName = ""
                oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.Code = "Jbs_UO"
                oUserObjectMD.Name = "Jobs UDO"
                oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
                oUserObjectMD.TableName = "JOBS"
                If oUserObjectMD.Add() <> 0 Then
                    Dim ErrMsg As String
                    Dim ErrCode As Long
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    MsgBox("Errorf adding UDO master Data" & vbCrLf & ErrMsg)
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
                    oUserObjectMD = Nothing
                    Return False
                End If
            End If

    Hi Hagai
    after oUserObjectMD.ChildTables.TableName = "JOBS1"
    just write
    oUserObjectMD.ChildTables.Add
    that would be
    oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.ChildTables.TableName = "JOBS1"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS2"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS3"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS4"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS5"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS6"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS7"

  • How to handle bdc for more than one transaction?

    how to handle bdc for more than one transaction?

    Hi srk,
    I am providing you with some references below. Hope this prove to be helpful to you.
    Method 1:
    Use one BDC_OPEN_GROUP
    Multiple BDC_INSERT 
    One BDC_CLOSE_GROUP.
    Call function BDC_OPENGROUP.
    Build BDC data and call lBDC_INSERT for transaction 1
    Build BDC data and call lBDC_INSERT for transaction 2
    Build BDC data and call lBDC_INSERT for transaction 3
    paas the tcodes to bdc_insert.
    call function BDC_CLOSE_GROUP.
    Also check this out:
    Here we need to record 2 transactions (shdb).
    Once completion of the recording. Populate the data into input internal table .
    Loop the internal table and process the 2 transactions
    like
    1. BDC_OPEN_GROUP
    2. LOOP AT ITAB
    a. Populate first transaction recording data
    and pass transaction to the BDC_INSERT_GROUP.
    BDC_INSERT_GROUP.
    b. Populate second transaction recording data
    and pass transaction to the BDC_INSERT_GROUP.
    BDC_INSERT_GROUP.
    ENDLOOP.
    3. BDC_CLOSE_GROUP
    the above info can be found at : How to use 2 transactions in BDC?
    Also check this out:
    Suppose u have created recordings for transactions 'MM01' 'XK01' and 'VA01'.
    Then do this:
    bdc_open_group.
    after this we have to fill the bdcdata structure for one transaction.here 'MM01'.
    bdc_insert.
    refresh bdcdata.
    after this we have to fill the bdcdata structure for one transaction.here 'xk01'.
    bdc_insert .
    refresh bdcdata.
    after this we have to fill the bdcdata structure for one transaction.here 'va01'.
    bdc_insert.
    bdc_close_group.
    Hope these are useful to you.
    Please reward if any of the above are useful.
    Regards,
    Kalyan

  • I have Elements 10. It doesn't handle RAW. It also doesn't allow more than one Fine JPG to be downloaded at a time. Can this be fixed with a download, or am I stuck to upgrade to Elements 13?

    I have Elements 10. It doesn't handle RAW. It also doesn't allow more than one Fine JPG to be downloaded at a time. Can this be fixed with a download, or am I stuck to upgrade to Elements 13?

    philips69374220 a écrit:
    I have Elements 10. It doesn't handle RAW.
    Yes, it does.
    FAQ: Will Photoshop Elements work with my camera, or Why won't my raw files open?
    It can handle the raw files covered by the ACR 6.7 version.
    For newer cameras, you can use the free Adobe DNGconverter to batch convert a folder into the DNG raw format that PSE10 can read and edit.
    (see the link in the upper document)
    Fine JPG to be downloaded at a time.
    All versions of Elements can open many jpegs at the same time, and the organizer lets you import as many as you want?

  • Handling the failures of more than one step..

    OK,
    So I have a package it has several steps, all of which run independtly. They are concerned with the generation of text files.
    The steps work, but I want to include good error handling.
    This is one of four Groups I have created, each with similar tasks inside.
    Lets take an example, of one group, I have attached a picture of the kind of failure I am trying to Trap.
    It seems it goes at the end of this post.
    Anyway, what I would like in the below example is, an email is sent to support stating:
     - The TaskName(s) that failed.
     - The ErrorDescription(s).
    For instance, in my example I deliberately set the overwrite to false, but I know there is a file there, so it would always fail.
    I tried some OnError logging for the job but it doesn't work.
    I also tried OnTask failure logging for the job but it doesn't work.
    The best I ever managed is an email with ONE of the failures on it, but I want one email with both failures on, (or all failures on, or 1 failure on, depedendent upon what fails).
    If that is 100% not possible, then I guess it might be OK (but it isn't really what I want) to get individual emails for each component. What is the best way to meet this requirement? fyi, if scripting is involved I use Visual Basic.

    Hi,
    I am creating a job that handles errors, using Event Handlers - On Error (see below).
    The point is that the dataflow task basically outputs the error message into a Variable (with Type Object).
    Then later, I include this on an email, saying the job has failed and this was the error we got.
    That all works fine, but as you can see I want to point more than one step into the error email.
    We can do so with an Or for OnError's.
    This is OK, but what I've noticed is that results are variable when more than one step fails:
     - For instance, I've set the job up on purpose so that two steps fail > the result is that you
    might get 1 email, but you might get more than one email. It's unpredictable; I wondered if there is a way round this!

  • [svn] 4916: sdk-14180 Handle updates to more than one field in an item when autoupdates are off .

    Revision: 4916
    Author: [email protected]
    Date: 2009-02-10 13:32:12 -0800 (Tue, 10 Feb 2009)
    Log Message:
    sdk-14180 Handle updates to more than one field in an item when autoupdates are off.
    QE Notes: None
    Doc Notes: None
    Bugs: sdk-14180
    Reviewer: ryan
    tests: checkintests mustella:collections
    Ticket Links:
    http://bugs.adobe.com/jira/browse/sdk-14180
    http://bugs.adobe.com/jira/browse/sdk-14180
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/collections/ListCollectionView .as

    Revision: 4916
    Author: [email protected]
    Date: 2009-02-10 13:32:12 -0800 (Tue, 10 Feb 2009)
    Log Message:
    sdk-14180 Handle updates to more than one field in an item when autoupdates are off.
    QE Notes: None
    Doc Notes: None
    Bugs: sdk-14180
    Reviewer: ryan
    tests: checkintests mustella:collections
    Ticket Links:
    http://bugs.adobe.com/jira/browse/sdk-14180
    http://bugs.adobe.com/jira/browse/sdk-14180
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/collections/ListCollectionView .as

  • How to handle form with more than one page in struts

    Hai,
    i have more than one page in my struts web apps. each page has a form & i have submit button @ last page. I navigate between these pages using titles. data has to exist when i come back from another page(i.e i am in page1 i have some fields called name & address as textfield, i move to page2 & then i go back to page1 @ that time i should have the name & addess values that i entered previous in the corresponding textfield) & finally when i submit need to get values form all these pages.
    Plz tell me how to do this.

    Hi prasadmca ,
    1.Try to store those value in session variable
    2. or else store those value in DB

  • How to deploy a Webapplication on WAS more than one times on same server?

    Hi all,
    I 've a special problem:
    In our web-app (some DC's) also stored propertie-Files. Now we would to deploy this application more than one times at same server using different WebContentRoots. (f.e. http://server/app1 and http://server/app2 a.s.o.)
    We know, that we must create different EAR-Projects and refer the web-Module and configure the application.
    But in the second application there it's recommended to change some properties.
    How we can handle this in JDI without copy the web-application?
    I hope my question can be understood.
    Best Regards
    Sven Rickelt
    Using Netweaver + WAS 6.40 2004 SP 13

    Hi Sven,
    as I'm new to NWDI, I cannot give you a 100 percent, field-tested solution. But have you already thought about using the Configuration-Adapter?
    If you can change the source of your web-app, you could maintain the data formerly stored in property files using the configuration adapter of visual administrator. The SC <a href="http://help.sap.com/saphelp_nw04/helpdata/en/45/e7e14b517b42788a1c166f9f32455e/content.htm">configuration</a> allows you to access this data.
    With this approach you can stick to one web-application and do the configuration work separately for each deployed application.
    Best regards,
    Frank

Maybe you are looking for

  • How to upload Inventory Items

    Hi, We are working on oracle apps 11i. There is a new requirement to add hundreds of items to the system. Is there any way or scipt that help us to upload these items specially that there are already quantities on hand for most of these items in the

  • Save file problem in network hard disk

    I connect to network hard disk called X: When i open a pdf file in X: and change something to save. A message will tell me "Files can not be saved, can not be saved to this file name, use a different name or save this file in another folder" But if I

  • Material for 1Z0-051

    i am planning on reading some material before taking the training for 1Z0-051 , Can you please suggest me some material for 1Z0-051. Thanks for you help. user5164885 Edited by: user5164885 on May 26, 2010 4:20 PM

  • Searching files for keywords

    Hi all, I am in the process of building a shell script as part of a auditing utility. It will search a specified directory for keywords and output results of the file path, and line number that the word was found on. I built a test script (shown belo

  • DKIM setup

    Hi all, I'm doing some research in how to setup DKIM for the company I work for. We are an email service provider and we use two c350d appliances (AsyncOS for Email Security 7.0) to sent out bulk email (permission based, opt in) for our clients. My q