JComboBox contents dont get updated(repainted) dynamically

Hi,
I have 2 Combo Boxes as 2 columns of a Table and the contents of the second combo box depend on the selection in the first one.
So I added an ActionListener to the first Combo Box and depending on selection, I update the contents of the other. The contents do get updated. But I see the change only when I click on the second Combo Box. I am trying to get the user to see the change w/o him touching the other combo box. The code snippet is as below:
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals(FIRSTCOMBO)) {
combo1Index = ((JComboBox)(e.getSource())).getSelectedIndex();
DefaultComboBoxModel model = (DefaultComboBoxModel)comboBox2.getModel();
model.removeAllElements();
model.addElements(as obtained);
comboBox2.setSelectedItem(0);
comboBox2.revalidate();
comboBox2.repaint();
Doesn't seem to work. Any ideas?
Thanks a ton!

I don't understand the design of your table. A combo box is used in a table to give the user a choice of values to choose from. Assume the combo box contains the values "a", "b", "c", "d", "e". As a user I choose "c". The "c" now gets stored in the data model and displayed in the table cell.
Now assume you change the contents of the combo box to "1", "2", "3", "4", "5". The value in the data model has not changed , it is still "c", so there is nothing to repaint.
When the user clicks on the cell then the new values in the combo box are displayed, allowing the user to choose a new value.
If you want the table cell to repaint a new value when the second combo box is changed then you must change the data model value. Use the table.setValueAt(row, column) method.

Similar Messages

  • How to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.

    how to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.

    Hi bluegrandpanash,
    Thanks for visiting Apple Support Communities.
    If you backed up your iPhone to iCloud before updating the software, first try the steps under "Restore from an iCloud backup" in this article to recover your data:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/HT1766
    Best Regards,
    Jeremy

  • Do I need to enable MySite or have a MySite created in order to follow content and get updates from Team Site library/Newsfeed?

    Hello, we are migrating to SharePoint 2013. In the current SharePoint 2007 implementation we have disabled MySite for several reasons. Question: Do we need to enable MySite or have a MySite created in order to follow content and get updates from Team
    Site library/Newsfeed?

    Hi,
    According to your description, my understanding is that you want to know if the MySite is needed for following content and getting updates of the followed content.
    When users follow documents, sites, or tags, status updates from documents, conversations on sites, and notifications of tag use show up in users’ newsfeed, so users need to their MySite to view the updates in Newsfeed by OOB and you need
    to migrate the MySite to SharePoint 2013.
    However, we can also use APIs to programmatically follow content, please refer to the link below:
    http://msdn.microsoft.com/en-us/library/office/jj163217(v=office.15).aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Merge content from a file that gets updated separately?

    Is there a simple way in RoboHelp to have a placeholder in a topic where content from a separate source file (e.g. HTML or Word) gets displayed such that if the source file changes, the content inserted in the topic gets updated when the project is regenerated?
    In other words, I have an HTML page in my project with some text and then a reference of some sort that grabs the contents of another file and pulls that in without a manual import?

    Yes, I'm using RoboHelp 8 and the explanation on your site did what I needed. Can the frame size (in red below) be dynamic to fit the content?
    <iframe src="save.htm"  
    frameborder=0
    style="width: 80%; height: 100px;"  
    scrolling="no">
    </iframe>

  • Since the last update for my Iphone 4s i dont get text messages when connected to wifi. my wife is getting them. Imessage is switched off on both phones.

    since the 6. version update. of my Iphone 4s My wife was getting my text messages. I found the problem was caused by Imessage when connected to Wifi. I deactivated Imessage on both phones to solve the problem. I now have updated my Iphone to 6.1.1 and i dont get text messages anymore. I have Imessage deactivated on my phone but my wife is getting my text messages again. my wifes phone was not updated to 6.1.1 because the last update lost all her contacts from her phone and we had to but them back in one by one from the outlook list. Her contact are listed in outlook on a seperate list to mine but we can only get my contacts download to her phone. We use the same laptop to sysc phones.
    My Iphone does not download photos to My Pictures anymore. I have to copy them across to a folder. I cant find where it backs them up to.
    I have lost all confidence in Apple now as i was forced to update to 6.1.1 because of 3G reception issues and not reciving calls and now back to spending several hours trying to fix my phone to recieve a basic text message.

    Are you and your wife sharing apple id?
    If you are that is the reason why she is seeing your imessage.
    On both phone go to settings - message - send&receive - make sure the cell is the default.
    You will have to uncheck or remove the apple id.

  • MY iPhone 4 after  being updated to iOS7 will not download or update any apps. When i press the button on my device to download a new app the loading wheel appears then in a few seconds disappears. I dont get a terms and conditions screen or anything.

    MY iPhone 4 after  being updated to iOS7 will not download or update any apps. When i press the button on my device to download a new app the loading wheel appears then in a few seconds disappears. I dont get a terms and conditions screen or anything.

    Ive tried using wifi and 3G seperately. Ive tried restarting the phone. Ive tried restoring it from a backup but none of these have worked yet.

  • ScrollPane: thumb doesn't get updated after contents of scrollpane change

    Hi,
    I some content in a scrollpane. The horizontal scrollbar(thumb) is showing because the content is to big to fit horizontally.
    The problem is if the content changes, i.e. gets smaller for example, the scrollbars don't get updated. Only after touching them with the mouse do they shrink/grow accordingly.
    Is this a bug (it looks like it)? Is there a workaround?
    Thanks in advance,

    Sounds like a bug. Can you file the issue in JIRA?
    Thanks!
    Richard

  • [svn] 4706: When handling the damageEvent make sure _contents gets updated with the potentially modified contents of the textFlow .

    Revision: 4706
    Author: [email protected]
    Date: 2009-01-28 07:58:30 -0800 (Wed, 28 Jan 2009)
    Log Message:
    When handling the damageEvent make sure _contents gets updated with the potentially modified contents of the textFlow. Either the contents or the style of the text flow, or both could have triggered the damage event.
    QE Notes:
    Doc Notes:
    Bugs: SDK-18749
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18749
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • HT4972 I have an IPAD 2 ios verison 4.3.3.  I am trying to update my ios to current version.  I dont get the option from Settings General for a software update.  How do i complete process?

    I have an IPAD 2 ios verison 4.3.3.  I am trying to update my ios to current version.  I dont get the option from Settings>General for a software update.  How do i complete process?

    If you are using iOS 4 (or earlier) there is no Software Update in Settings. That feature was first added in iOS 5.
    To update you will have to connect your iPad to iTunes on a computer (preferably the one you sync with and backup to).
    See here: http://support.apple.com/kb/HT4972

  • Firefox+Flash: Some flash applets' content doesn't get updated

    Hello community,
    I stumbled upon a very strange problem with Firefox and Flash. Some flash applets (example: http://www.kenken.com/game) show only a plain white rectangle. For a long time I thought that it is a problem with Flashblock and/or NoScript. Today, however, I tried to get rid of the problem and made following observations:
    1. The problem persists in safe mode (with deactivated extensions).
    2. The problem persists after disabling hardware acceleration in the Firefox settings.
    3. The problem does NOT occur in Chromium&Pepper Flash. But I'd like to stick to Firefox for many reasons.
    4. The problem does NOT occur on my laptop running Manjaro (however, the setups are not really comparable).
    5. Initially I thought that the flash applets aren't initialized at all, however, now I observed that if I switch to a different tab and then back to the tab with the flash applet, it gets updated. I can also interact with the applet, however, the changes are only visible after I do the tab switching.
    Any help or hint how to find the cause of the problem is greatly appreciated!
    Thanks in advance,
    PhotonX

    A new finding: I tried to install an older version of Firefox and downloaded a binary from https://ftp.mozilla.org/pub/mozilla.org … /releases/. The older binary worked so I tried newer ones and finally arrived at the very same version as the one installed through the package management. The result is: The 33.0.2 binary downloaded from Mozilla works, the 33.0.2 installed through the package management doesn't! All extensions installed on my machine are available in the downloaded binary, so I assume that it knows about ~/.mozilla. What could be the cause of the problem then? Will try to start Firefox with a completely clean home folder (new user) and report back.
    edit: Narrowed down the list of problematic files to this:
    $ ls -l /home/photon/.mozilla/firefox/sw0n83fl.default/
    insgesamt 94852
    -rw------- 1 photon users 94222 31. Okt 11:22 prefs.js
    -rw------- 1 photon users 141109 31. Okt 11:17 search.json
    -rw------- 1 photon users 734 31. Okt 11:06 search-metadata.json
    -rw-r--r-- 1 photon users 65536 19. Jun 2012 search.sqlite
    -rw------- 1 photon users 16384 30. Apr 2011 secmod.db
    -rw------- 1 photon users 288 31. Okt 11:22 sessionCheckpoints.json
    -rw------- 1 photon users 2480 31. Okt 11:22 sessionstore.js
    -rw-r--r-- 1 photon users 393216 4. Sep 08:49 signons.sqlite
    -rw------- 1 photon users 25 15. Mai 2013 times.json
    -rw-r--r-- 1 photon users 62914560 21. Nov 2012 urlclassifier3.sqlite
    -rw------- 1 photon users 154 31. Okt 10:26 urlclassifierkey3.txt
    -rw-r--r-- 1 photon users 1622446 21. Nov 2012 urlclassifier.pset
    -rw-r--r-- 1 photon users 31850496 31. Okt 11:22 webappsstore.sqlite
    edit: The problematic file is prefs.js.
    Last edited by PhotonX (2014-10-31 10:29:25)

  • Multiselect dropdown list is not getting updated in checkin form

    Hello Experts,
               Am facing issue in updating values of drop down list in content check in  form. I have two fields Country,Location have created dependent list, based on country Location values get populated. I have created two views countryView & locationView. Now am updating values in locationView Table from backend through sql insert query, table gets updated successfully but in the content checkin form am unable to see the newly inserted values in drop down list under location metadata. Please help.
    Thank you,
    Sagar.

    You can't directly update the database, and expect the system to simply recognize you've changed something.  Content Server is not designed to work in that manner.
    You have to republish schema in order for the updated table to be recognized.  Use the same solution found in the following thread.  Schema Publishing issue in Oracle UCM 11g
    And I'd strongly suggest getting away from directly changing data in the database outside of the application's framework/methodology.  There is real potential for making problems that have far-reaching impacts that are not easy to fix, and may make your installation unsupportable.

  • Field value not getting updated in R/3

    Hello Experts!!
    I am facing a problem while updating a field value back in R/3.
    The Syncbo is of type U01 and the field has data type char 40.
    The meRepMeta.XML file has following description
    Field name="DESCR1" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false">
    <Input type="modify">false</Input>
    1) when i test the function module in R/3. The field value is gets updated.
    2) when i create a record for the sync BO from client , i can see the field value being created on the client.
    3) when i synchronize, i dont get any error or warning and get a successful message.
    S        15.07.2008 12:19:09 All updates for one TOP block were successful (seq. no.=65, TOP cntr.=0000000001)
    15.07.2008 12:19:09 Synchronizer UPLOADER completed successfully (mobile ID=0000002646, SyncBO=ZDBMSERORD)
    I am not able to locate where is the problem
    Please suggest!!
    Regards,
    Priya Ghosh

    Hi,
    please check your maping in the create handler in MEREP_SBUILDER. Perhaps the value is created on the client but not mapped to the field of the function module. Furthermore have a look into MEREP_MON and see if the data gets forwarded in there.
    At last I would dump the information received by the function module into a table without any logic. So you can see what data actually is forwarded into the funct module - if brake point i not possible.
    Hope this helps.
    Regards,
    Oliver

  • Open Sales Order values not getting updated after run RVKRED77 & RVKRED88

    Hiiii,
    In Production Server. We run the reports RVKRED77 & RVKRED88. Credit info structure and and Open Sales Order values not getting updated. In FD32, Status - Sales value it showing '0". At the time of creating Sales Order Dynamic Credit check not happening coz of Tables S066 not updating. Please provide me Solution.
    Best Regards,
    Sridhar . P

    Dear Heagal,
    I followed your suggestions and implemented in the Development and moved the changes in to Quality Server. I tested it thoroughly by creating New Customer and maintained Credit Limit. I come to know that Problem is in all Servers. I made 3 changes.
    1. In Pricing Procedure Sub Total A it was not maintained against Net value. I placed it.
    2. Removed Credit groups for Delivery Type.
    3. In OVA8 i maintained Max. Doc Value :99,999,999.00 before it was with 1.00
    I checked the OMO1 Settings it was Asynchronous. As SAP Notes Suggesting to use Synchronous but here it's a client setting. So, It's Can't possible to change. Changes will affect other Company Codes.
    Tested both in DVP and QTY Dynamic Credit Check is working Perfectly and Status in FD33 Sales Value field getting update.
    If i move these changes in to Production, Will i need to run the reports again or not? How it will affect on Old Cusomer Billing and  Credit Limit data. For few of the Customers the Credit Limit data it was exceeded. Please provide me advice. The issue need to be Solved immediately.
    Best Regards,
    Sridhar

  • I have logged in to my itunes account on a different computer and none of my purchased music is showing up. I also have plugged my iphone in to get updates but it says I will lose all media and apps if I don't update on the computer where  I sync everythi

    I have logged in to my itunes account on a different computer and none of my purchased music is showing up. I also have plugged my iphone in to get updates but it says I will lose all media and apps if I don't update on the computer where  I sync everything. I have authorized this new computer so I don't know what the problem is. I can't get on my old computer with my itunes account because the computer is broken. Not sure what to do

    "I have logged in to my itunes account on a different computer and none of my purchased music is showing up."
    Correct.  it does not magially appear in other places.  It will only be where you put it.
    "I also have plugged my iphone in to get updates but it says I will lose all media and apps if I don't update on the computer where  I sync everything. "
    Correct as well.  Iphone will sync with one computer at a time.  Syncing to another will erase the current content.
    You need to copy everything ( itunes library/contacts/pics/calendars/files/docs) from the old computer, or your backup copy of the old one, to the new one.

  • App store demands credit card information now, so i can't get updates anymore, why is that?

    I bought an iPad from Apple using my credit card, the App Store on my phone seems to have noticed the purchase and is demanding I give it my credit card info too so I can continue making easy purchases there too, problem is that I don't want to make purchases from App Store yet, but now I can't get updates for the apps that I am using. How can I get updates without giving up my credit card?

    I haven't suggested you are dumb, indeed I only think people are dumb if they don't ask about things they don't understand.
    I was asking why you changed your Apple ID to see if you really needed to, it sounds as though you may not have needed to.
    You can change your personal email you use with your Apple ID, but you can't change your iCloud address. If you do this you can continue to use your old Apple ID and without causing problems with purchased content.

Maybe you are looking for

  • Safari 6.1 freezes and then can't connect to the server when I refresh the page

    Hi everyone. I have a Mid 2010 13" Macbook. It is running the following.. Processor: 2.4 GHz Intel Core 2 Duo Memory: 4GB 1067 MHz DDR3 Graphics NVIDIA GeForce 320M 256 MB Software OS X 10.8.5 (12F45) Hard Drive: 320GB Recently Safari has been acting

  • Why is there a discrepancy in time between iCal on the computer and iCal on the iPhone?

    If I enter an event into iCal from the iPhone, it will be displayed three hours earlier when I access iCal from the computer.  If I enter the event from the computer, it displays three hours later in iCal on the iPhone.  The time zone is set correctl

  • Nforce2 Audio hardware accelration

    hello this is my nforce driver version 6.14.431.1 why do programs say i have no hardware acceleration? thanks

  • IOS 8.02 not letting me make outgoing calls

    I don't know what's going on. At first I thought it was a fail-safe when bad I was in bad service. But even on LTE my phone REFUSES to let me make outgoing calls. I can't even type in the number and call. Any way I try, it fails. Won't even pull up t

  • Mail address matching is stuck

    I did a straight upgrade (meant to do archive and install but didn't) and it all seems good with this exception. When I type a name in the to: slot in mail, the little wheel turns and turns and never matches the characters typed with an address in my