JTree has to update a JComboBox (URGENT!)

Hi all,
I have a problem using a JTree and a JComboBox. I would like my JComboBox to be updated when a user clicks on a node of the JTree. I wrote a JPanel containing the JComboBox and implementing the TreeSelectionListener. It turns out that my JPanels listens, ok. In the implementation of the listener, I just wrote code which has to empty my JComboBox... and it does it! When I use the getItemCount() method it returns 0. Great. But now, why isn't my JComboBox updated graphically?? The problem is there: although the JComboBox should be empty, the previous items stay there...Why?
By the way, I use a DefaultComboBoxModel... so that any change to this model should be transmitted to the JComboBox. But it doesn't work (at least graphically).
I hope someone will answer, this is a truly desesperate call! Thanks,
Jack

sounds like you need to revalidate() the panel after your listener on the JTree has done it stuff

Similar Messages

  • Va02 screen input first save it has to update the data base table

    I am working on VA02.
    For only one user(delivery block)should be block and when we are changing in sales order document for that user it has to update the VBAK table.
    for second save i'm able to updating but i want to update at first save only.
    thanks,
    sree.

    I want to update the DB table VBAK. and the user exit is:
    here is my coding: my requirement is to block a field i.e LIFSK in va02 and after saving that and i have checked vbak table then in lifsk the blocked db is updated IN TABLE CONTENTS.LATER IF I SAVE IT ANOTHER TIME WITHOUT ANY MODIFICATIONS THE FIELD IS NOT UPDATED.
    now the problem is with updation .i have blocked the field.
    Please help me  its urgent
    FORM USEREXIT_MOVE_FIELD_TO_VBAK.
    tables: knkk.
    if not vbak-kunnr is initial.
      if vbak-auart NE 'ZFD' and
         vbak-auart NE 'ZCR2' and
         vbak-auart NE 'ZRE' and
         vbak-auart NE 'ZSD'.
        select single * from KNKK
          where  KUNNR = vbak-kunnr
          and    KKBER = '8000'.
          if sy-subrc = 0.
            clear vbak-LIFSK.
          ENDIF.
          IF NOT SY-UNAME = 'FINCOMM1' AND SY-TCODE = 'VA02'.
              SELECT SINGLE LIFSK FROM VBAK INTO LIFSK1 WHERE VBELN = VBAK-VBELN.
               IF LIFSK1 NE ' '.
                  vbak-LIFSK = ' '.
               ELSEif vbak-auart eq 'ZCR2'.
                      vbak-LIFSK = 'Z1'.
                  ELSE.
                      vbak-LIFSK = 'Z6'.
               endif.
             if sy-tcode eq 'VA02' . "added on 22/05/2008
            if screen-name = 'VBAK-LIFSK'.
                  screen-input = 1.
                  modify screen.
                  update vbak.
            endif.
      ENDIF.
          ENDIF.
      endif.
    endif.
      if sy-tcode eq 'VA02' AND sy-uname NE 'FINCOMM1'. "added on 22/05/2008
            if screen-name = 'VBAK-LIFSK'.
              screen-input = 1.
                  modify screen.
                  update vbak.
            endif.
    endif.
    endform.
    Thanks,
    sri.

  • One of my apps has recently updated. Now I cannot get into it . How do I get my data back?

    One of my apps has recently updated. Now I cannot get into it. I am afraid if I delete it , it will lose its data. Help.

    First check to see if it's on the multitasking list and if so, force close it: double-tap the home button, locate the app in question, swipe up on the image above the app icon then tap the home button again.
    If not, try restoring your most recent backup.  It should include the app data.  This explains how to restore an iCloud backup: iCloud: Restore or set up your iOS device from iCloud.

  • ExecuteUpdate() returns 1 , but actually it has'nt updated the DB tables

    DATABASE USED : ORACLE 9i
    This is the function that is been called.
    althou, this returns a +ve ans. , saying that the db has been updated ; but when i login into the DB, i donot find the row updated.
    public void process(File dir) throws Exception
         FileInputStream fileIn = null;
         byte b[] = null;
         PreparedStatement stmt = null;
         PreparedStatement stmtBank = null;
         PreparedStatement stmtBrand = null;
         ResultSet rs = null;
         String updateBankInfoTable = "UPDATE ARBANKINFO SET ISSUERLOGO_LARGE = ? WHERE BANKID=?";
         String updateBrandInfoTable = "UPDATE ARBRANDINFO SET ISSUERLOGO_LARGE = ? WHERE BANKID=? and RANGEID = ?";
         int bankId = 0;
         int rangeId = 0;
         // FileNotFoundException or SecurityException might
         // be thrown while reading the files in this dir.
         try{
         fileIn = new FileInputStream(dir);
         }catch(Exception e)
              e.printStackTrace(p);
         String fileNameStr = dir.getName();
         if (fileNameStr!=null || fileNameStr.length()>0)
              // Read the file in a byte array
              long fileLen = dir.length();
              int readBytes = 0;
         int totalRead = 0;
         b = new byte[(int)fileLen];
         while((long)totalRead < fileLen)
         try {
                        readBytes = fileIn.read(b, 0, (int)fileLen);
                   } catch (IOException e1) {
                        e1.printStackTrace(p);
         totalRead += readBytes;
         if (fileIn != null)
         fileIn.close();
         try{
         if (bankIDString!=null)
              stmt = conn.prepareStatement("select BANKID,RANGEID from ARESENROLLPROCESS where MAINLOGOURL = ?" +
                   "and BANKID IN ("+bankIDString+")");
         else
              stmt = conn.prepareStatement("select BANKID,RANGEID from ARESENROLLPROCESS where MAINLOGOURL = ?");
         stmt.setString(1,fileNameStr);
         rs = stmt.executeQuery();
         int i =1;
         while (rs.next())
              bankId = rs.getInt("BANKID");
                   rangeId = rs.getInt("RANGEID");
                   i++;
                   if (rangeId!=0)
                        stmtBrand = conn.prepareStatement(updateBrandInfoTable);
                        stmtBrand.setBytes(1,b);
                        stmtBrand.setInt(2,bankId);
                        stmtBrand.setInt(3,rangeId);
                        if (stmtBrand.executeUpdate()==1)
                                                 p.println("Updated ARBRANDINFO table ");
                        else
                             // log in something
                                                 p.println("*** Column not found in ARBRANDINFO table");
                   else if (rangeId == 0)
                        stmtBank = conn.prepareStatement(updateBankInfoTable);
                        stmtBank.setBytes(1,b);
                        stmtBank.setInt(2,bankId);
                        if (stmtBank.executeUpdate()==1)
                                                 p.println("Updated ARBANKINFO table");
                        else
                                                 p.println("*** Column not found in ARBANKINFO table : " +
                                       "BANKID--> "+bankId);
                   if (stmtBank != null)
                   stmtBank.close();
              if (stmtBrand != null)
                   stmtBrand.close();
         }catch(Exception e)
              e.printStackTrace(p);
         if (stmt != null)
              stmt.close();
         if (stmtBank != null)
              stmtBank.close();
         if (stmtBrand != null)
              stmtBrand.close();
    Any suggestions ?????

    i don't see how not setting the autoCommit parameter
    has anything to do with this.If autocommit is false then an update will not be committed without an explicit commit()!
    >
    I would like to add one more thing in here, which m
    sorry i shud hav added; this particluar fn. does
    update a lot of row; but for some records, althou it
    does say that it has updated(java API ); but in
    reality it does not do it.
    That makes a lot fo difference! It does mean that it is probably not a commit problem but without this extra information my money was on a commit problem. Are you swallowing an exception without reporting it?

  • I have a Windows 8 laptop which has been updated to 8.1. I'm trying to rename a playlist and it won't let me do it - it did last time but I've updated my itunes since then. What's happened and how can I do it, please.

    I have a Windows 8 laptop which has been updated to 8.1. I'm trying to rename a new playlist in my itunes which I could change befor the last update which was very recent. It won't do it like it used to. Help, please! reetz58

    yeah it is the gayest thing that happens :S what i do is turn off the internet, then open it, then turn on internet, then use it. :S OR make your homepage a tab.

  • How do I change icloud email when my apple ID has been updated to new email? Because of the update on apple ID, when I try to delete icloud account I have to put in the password, and it says username or password is invalid (because no longer apple ID).

    How do I change icloud email when my apple ID has been updated to new email? When I try to delete icloud account (in settings-icloud-delete account) I have to put in the password for the apple ID of my old email address, which is no longer my apple ID, and it says username or password is invalid (I'm guessing because that is no longer my apple ID).

    You will wait for the rest of your life. You need to fix it; no one else will. To turn off "Find my iPhone" and its associated Activation Lock you need the Apple ID and password that were used to turn it on. If you know the Apple ID you can contact Apple Account Security and have them reset the password (after you prove you are the rightful owner of that Apple ID). see: http://support.apple.com/kb/HT5699.
    If you don't know the Apple ID the phone is permanently unusable.

  • Since Firefox8, every time I start it, it opens 2 extra tabs to tell me that Firefox is installed, and that dwhelper has been updated. These changes are not new. Also, when I open a bookmarked site, the previously open site remains open.

    '''bold text'''

    See these articles for some suggestions:
    * https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    * https://support.mozilla.com/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    * http://kb.mozillazine.org/Preferences_not_saved

  • ICal on my MacBook Pro has been "updating" for days...??

    I have an iMac, MacBook Pro, iPad and iPhone.  I have been using iCloud since it came out (running Lion).  iCal on my MacBook Pro has been "updating" for several days.  Also - when I add an event on the MacBook, it does not show up on any of my other devices (they are all set up with the same iCloud calendars).  When I add events from my other devices, they DO show up in iCal on my Macbook Pro.
    I am at a loss -- any help would be VERY much appreciated!
    Thanks
    Kim

    Hello
    Chance upon your post and yes, immediately after upgarding to Mountain Lion, my "new" Calendar (Desktop, formely known as 'iCal') keeps having the pop up window saying "Updating Calendar..." (I set my Calendar to auto-launch after Startup)
    After restarting it will still be the same, but if I quit and launch again, everything will be fine.  Will try the method you posted (the thread) tonight.  Although I deleted the iCal preferences, thinking/hoping it will help
    However, I don't seem to have a problem with sycning of al events, my sync with iCloud and all my macs and iOS devices seem OK.
    If events are not syncing into some of your iOS devices, why don't you try deleting the entire iCloud account on it and re-set a new one?  I've done that before when events or other data don't properly sync
    Cheers

  • PGI status at delivery header level has not updated

    Dear Friends,
    We had created deliver, picking was completed and PGI was completed successfully. However when we try to create Billing, an error occurs stating that PGI is not completed.
    Further when we check the delivery, the Goods Issue status at item level is completed but at the Header level the GM is B which is partially completed. In the Document flow we can see the PGI Status is completed.
    I think there might be some table which was not update. Is there any way to update the status in the delivery?
    Further we tried to reverse the PGI through VL09, but system is not able to find the delivery ..this might be because the system might be checking in some table where the statues has not updated.
    Please suggest me how should I complete this.

    HI,
           Go to transaction "SE16N" and enter table "VBUK" and give the delivery number in the field sales document number. Now you type "&SAP_EDIT" in the transaction bar and execute. Here you can change the status(Total goods movement). And see If you can actually bill the document. Kindly please let me know If you need any more information on this.
    Regards,
    Ram Pedarla

  • My iphone 4 will no longer connect to my Itunes since 7.1.1 update itunes has latest update as well followed help which involved using mobile device properties no good re installed itunes still same problem iphone is showing up on pc as connected

    my iphone 4 will no longer connect to my Itunes since 7.1.1 update, itunes has latest update as well followed help which involved using mobile device properties no good re installed itunes still same problem iphone is showing up on pc as connected but itunes unable to see it
    any Ideas cheers

    Try holding the power and home button untill the apple symbol appears and let it reboot, if that does not work Try a DFU restore https://discussions.apple.com/thread/5269891

  • I have a iPad 2 I brought it yesterday and it has an update for iOS 6.1 but it won't let me download it. It keeps saying your no longer connected to the Internet but I'm connected to my wifi. Can you help please

    I have a iPad 2 I brought it yesterday and it has an update for iOS 6.1 but it won't let me download it. It keeps saying your no longer connected to the Internet but I'm connected to my wifi. Can you help please

    Hi Blueandpink,
    If you are running iOS 4, you will need to update the iPad via iTunes on your computer (can't do OTA updates unless you have iOS 5 or higher).
    If you have a first generation iPad, unfortunately you won't be able to update to iOS 6 (iOS 5 is the highest you can update to on the original iPad).
    If you are on an iPad 2, 3, or 4th generation with iOS 5 and it still isn't working, try holding  down on both the Sleep AND Home buttons at the same time for about 10-15 seconds (ignore the red slider button). Keep holding it until the Apple Logo appears. When you see the Apple logo on the black screen, let go of the buttons. This “reset” fixes a lot of iPad issues and might work to resolve the update issue. Try updating again.
    Hope this helps!
    ~Joe

  • My Mac Mini doesn't recognize my Avengers DVD--it keeps saying "Supported disc not available." I've tried other DVD's which work, but not this one. itunes and everything else has been updated to the newest versions. Help?

    My Mac Mini doesn't recognize my Avengers DVD--it keeps saying "Supported disc not available." I've tried other DVD's which work, but not this one. itunes and everything else has been updated to the newest versions. Help? Also...It doesn't recognize the digital copy DVD.

    I have ALL the exact same symptoms as on my home computer.
    It sure sounds to me like something on the iPod is broken. If it's under warranty then I would send it back for repair. If not, check out some of the web repair services, such as iPodResQ etc.

  • When the user press the button Calculate Tax (see attached doc) and click on Tax details then this should be updated automatically. But it does not work it is empty and the user has to update manually.

    When the user press the button Calculate Tax  and click on Tax details then this should be updated automatically. But it does not work it is empty and the user has to update manually.
    All setup looks fine.
    Please let me know what can be done on this?
    Regards,
    Peu

    HarryAustralia wrote:
    I recently updated my ipad wifi only to the new ios 6.1.2 and initially I had the auto cover lock option which can be seen in the Generals tab, but then it stoped working!! Before the update, the auto cover lock worked fine. So after trying all the options, I then did a complete reset on the ipad and now its gone all together from the General tab!! I can no longer see the "auto cover lock" option.
    The iPad cover lock is for when you use a cover with magnets in it to lock and unlock the iPad when you close the cover or open it. Try running a refrigerator magnet along the sides of the iPad and see if that trips the iPad Cover Lock back into the settings.
    That is not the same thing as the iPad Auto Lock setting which allows you to set an allotted time before the iPad goes to sleep.
    You can try resetting all settings to see if the Auto Lock feature retinrs to the iPad.
    Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. This can be a little time consuming re-entering all of the device settings again.

  • My FireFox for Win 8.1 has been updating for 2.5 HOURS. Why is it taking so long.?

    After my win 8.1 laptop came out of sleep mode, Fire Fox told me it was running (where and how I do not know) and I could not access it unless I restarted. I shut down and restarted. FireFox asked me to "update" firefox. It has been updating for 3 HOURS. What is going on???
    Alan

    # Download the full installer from
    #* http://www.mozilla.org/firefox/all/
    # Restart Windows.
    # Start Windows Explorer. Paste the following in the address bar and press Enter:
    #* %LocalAppData%\Mozilla\updates
    # Order the list by Date Modified. You should see a folder that was modified either today or yesterday. Delete it.
    # [[Uninstall Firefox from your computer|Uninstall Firefox]] from the Windows Control Panel. <u>DO NOT</u> check the option to remove your personal data and customizations.
    # Run the installer you downloaded earlier.

  • My ipod shuffle disappears after I click on the icon in Itunes. I reinstalled Itunes and my computer has been updated. What else can I do?

    My ipod shuffle disappears after I click on the icon in Itunes. I reinstalled Itunes and my computer has been updated. What else can I do?

    The shuffle icon in iTunes disappears, after you click on the icon in iTunes?  If so, if you do not click on the shuffle icon in iTunes, does it remain there indefinitely?  Are you looking at the shuffle icon in the iTunes sidebar?

Maybe you are looking for

  • Report with 5 ALV grids on 1 screen

    I am trying to build a screen/report with 5 ALV grids which are interactive. One grid will display all sales order. When I click on a Sales order Hotspot, the items of the sales order would appear in the ALV grid box below. When i click on an sales o

  • Dynamic Reporting

    Can i have my templates empty...and when from my site someone choose print report the appropriate template and the appropriate datasource(given run time) produce the report?????

  • Standard Bank Reconciliation and Customer and Vendor Statement of Accounts

    Hello Experts, I am implementing ECC6.0 now.  I'm noit very familiar with the version so I am very hopeful that you could help me find the following standard reports in SAP. If these are not standard, then I need to recommend customization since the

  • I can't login my MacBook Pro, I know the password, but it does not enter. PS: I can't either boot my Mac.

    I was with Lion on my MacBook Pro, I came back to Snow Leopard, The firs time I tried to login i fail, but I know my password. To solve the problem I boot it with the Snow Leopard DVD, but I failed again (I tried many times, pressing C and restarting

  • Watching films from IPAD to TV

    watching films from IPAD to TV - I visited the apple store in windsor today and requested info on how to watch films from my IPAD to a flat screen TV - The girl was clueless and tried to sell me a lead which would not even connect to my TV !!!! = I b