JComboBox can't deal with multiple identical entries??

Hi,
I set up a swing application that displays data from an Oracle source in some Swing components like JComboBox, JList, ..
One row from the data of my CachedRowSet is displayed using the model and selectedmodel properties in a JComboBox. It is displayed correctly, but look at this data:
myValue_1
myValue_1
myValue_2
The SelectedIndex property is set to the same value for the first entries!! This way I can't find out what entry the user selected. (additionally: since the RowSet and JComboBox are connected via a model, the 'cursor' of the RowSet moves when a different entry is selected in the swing component. But the RowSet method getRow also returns the same value when selecting one of the two first lines above...).
If I'm not using the model interface to populate the ComboBox, it fails (**not sure whether this is the same problem here!!**).
Any ideas?
Buck M.

DrClap> pretty strange design
The idea was to split up information from an object (in this case my resultset or RowSet from a database) and display the information in different display/input fields of my form. There would be a unique field 'id', but the 'name' field is user defined and could be identical if the user wishes to.
I just tested filling the ComboBox with .add("Test") statements (no RowSet) or with String-objects. Same thing happens!
I thought the ComboBox would store and use (e.g. in SelectedIndex() ) the position of the selected item in the list, but obviously it seems to be the value?!?
I will use a combined 'name'+'id' entry in the ComboBox now. Still interesting....

Similar Messages

  • Howto deal with multiple source files having the same filename...?

    Ahoi again.
    I'm currently trying to make a package for the recent version of subversive for Eclipse Ganymede and I'm almost finished.
    Some time ago the svn.connector components have been split from the official subversive distribution and have to be packed/packaged extra. And here is where my problem arises.
    The svn.connector consists (among other things) of two files which are named the same:
    http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/features/org.polarion.eclipse.team.svn.connector_2.0.3.I20080814-1500.jar
    http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/plugins/org.polarion.eclipse.team.svn.connector_2.0.3.I20080814-1500.jar
    At the moment makepkg downloads the first one, looks at its cache, and thinks that it already has the second file, too, because it has the same name. As a result, I can neither fetch both files nor use both of them in the build()-function...
    Are there currently any mechanisms in makepkg to deal with multiple source files having the same name?
    The only solution I see at the moment would be to only include the first file in the source array, install it in the build()-function and then manually download the second one via wget and install it after that (AKA Quick & Dirty).
    But of course I would prefer a nicer solution to this problem if possible. ^^
    TIA!
    G_Syme

    Allan wrote:I think you should file a bug report asking for a way to deal with this (but I'm not sure how to fix this at the moment...)
    OK, I've filed a bug report and have also included a suggestion how to solve this problem.

  • Lion - Can it cope with multiple screens yet?

    I have two screens attached to my iMac.  It's terrific how MacOS Expose deals with them up 10.6.8 as compared with my PC at work.  At home, amongst other things, iMovie immediately knows whether or not my second monitor is attached and plays footage back on my second display leaving my main monitor for iMovie editing.  It does this of it own accord with no intervention from me. 
    At work on the PC I can't even pursuade the machine to keep its windows displayed together on the correct screen without having to constantly mouse them around.
    I have head that 10.7 (Lion) can't cope with multiple displays any more so for this reason, and one or two others that I won't go into here, I have resisted the urge to upgrade.
    Can anyone confirm that this is true and, now that some time has passed,whether or not Lion has now been updated to recover this functionality?
    Much obliged.

    Seems I was incorrect.  One can use a second monitor as an extended desktop on an iMac with Lion installed.
    Watch this video and see the guy do it.
    http://www.youtube.com/watch?v=l5nTGlyWpTM

  • How to deal with multiple disk path's

    hi
    i'm setting up a new server with virtual servers with extra io domain's
    now i have a question on how to deal with multiple disk path's
    so following questions:
    - can i enable multipath on the primary and on the alternate domain?
    i tried this but when rebooting the alternate the alternate keep's freezing and the only solution is to hard stop it and it's depending host
    - if i can't enable multipathing how to handle this
    for example a disk has on the primary domain 4 path's to a disk
    do  i then assign all 4 path's to a virtual disk server or do i create a virtual disk server per path
    if i do the first is adding all the path to the same mpgroup enough or not

    Hello
    1.-can i enable multipath on the primary and on the alternate domain?  Yes. i understand for multipath mpxio or similar.
    2.-i tried this but when rebooting the alternate the alternate keep's freezing and the only solution is to hard stop it and it's depending host
    if you are going to use alternate domain you have to give this IO the all bus root nexus, what you describe sounds like DIO,
    3.- - if i can't enable multipathing how to handle this for example a disk has on the primary domain 4 path's to a disk
    If you have 4 path to the same disk in the primary and you are using multipath let's say mpxio, then you will have only one disk in the primary, which is a virtual device that handle the 4 paths.  That's is what you have to use in a vds.
    Please check this doc to see the best practice to ldom
    white-paper-ldom
    regards
    eze

  • It says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    I just got my new iPad Mini2, and when I choose "sign in with your apple ID", it says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • HT5621 I have moved permanently from the US to live in the UK. when I try to download a UK app I am often told that I cannot use a UK Apple sstore, only a US store. I need to access various UK stores how can I deal with this?

    I have moved permanently from the US to live in the UK. when I try to download a UK app I am often told that I cannot use a UK Apple sstore, only a US store. I need to access various UK stores how can I deal with this?

    Try here
    http://support.apple.com/kb/HT1311
    when you have UK Cards etc best to change as well

  • Adobe always quits unexpectedly in Mac when I read a bit fast. How can i deal with it, plz?

    Adobe always quits unexpectedly in Mac when I read a bit fast.
    It is the latest update.
    How can i deal with it, plz?

    You posted in the forum for iPad and iPhone (different app). I've moved your question to the Reader forum for desktop/laptop computers.

  • How can I deal with an apostrophy

    My simple questions is how can I deal with an apostrophy when I trying to save to the table, here is an example in how I am saving.
    'Sandr'as Casa' this gives me an error message. I have to do it like this
    Strings.replace("Sandr'as Casa"," ' "," ' ' "), a package function
    SQLDesFollow = "UPDATE [CRVMReq] " +
    "SET [SkillSet]='" + Strings.replace("Sandr'as Casa"," ' "," ' ' ")+ "'" WHERE [ReqId]='" + ReqValuesReqId[4] + "";
    dbs.execute(SQLDesFollow);
    SQLDesFollow = "UPDATE [CRVMReq] " +
    "SET [SkillSet]='Sandr'as Casa' WHERE [ReqId]='" + ReqValuesReqId[4] + "";
    dbs.execute(SQLDesFollow);
    any help will be appreciated.

    Here is the magic word: PreparedStatement.
    Start here:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/pr
    epared.htmlSeconded, thirded and fourthed.
    And if later readers of this thread feel that they would like to provide another answer then they should think again because they would be wrong.
    There is only one correct answer to this question. PreparedStatement.

  • How can I deal with long sql by the oo4o?

    I am using VB and oo4o to develop a sql executor which is a extention of an old system.
    For some reason, I have to use oo4o v8.1.7 to deal with Oracle Database 8i to 11g.
    But when I send a very long sql(11KB) to it I got a error in the VB enviroment.
    The Err.Description is "automention error. Started object is disconnected by the client.".
    The Err.Number is "-2147417848 ".
    The sql that I send it to the program is a simple select sql that like select a, b, c, substrb(d, 1, 2), substrb(e, 2, 3) .... from A_TBL where A=aa;
    This sql is normally executed by the sqlplus but I got an error by the oo4o.
    When I insert a '' between the 30Xth items, it got exectuted normally.
    ex. select a, b, c, substrb(d, 1, 2), substrb(e, 1, 2) ..... substrb(303th, 3, 4), '', substrb(304th, 1, 2) ... from A_TBL where A = aa;
    How can I deal with this problem? Thanks.

    So how can use this function correctly?By learning what exceptions are, how they're used, and what you can do to deal with them. There's a tutorial here: http://java.sun.com/docs/books/tutorial/essential/exceptions/index.htmlAnd here's a quick overview:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

  • Zen Vision M Firmware Problem!!! Can't deal with this thing any more...

    Can't deal with this thing any more...3 Hello friends I'm new in the forum
    Well as the title mentions, I'm about to throw this thing oute of the window!!!
    It's a 30 GB Zen Vision M, I own it ,5 years now...
    I have read all the relevant posts in the forum about this player, I tried my best, nothing really worked.....
    So now I have a Zen which only boots in the recovery mode!!
    I have Cleaned it Up, Formated it, and tried to reload its firmware BUT when I connect it and try to reload it, in the end it always says Firmware Upgrade Failed!!Really can't understand it!!!!!
    I've communicated with Creative, i wasn't at all satisfied with their responses... I think what they're trying to do is to avoid me, and earn some time with really useless suggestions which I had already told them won't work!!!So in the end they wanted me to send my Zen in Italy and pay more than 100 Euros for what an ,5 year old mp3 player?No I prefer buying a new Cowon with that amount of money!!!
    Anyways I'm pretty mad now, so I'll move to the subject..
    I have Service Pack 3 Windows XP in my computer, and I did roll back on the Media Player 0 from the I had, using the instructions from a previous post. The truth is that it rolled back with less steps than it showed, and I say that because it mentions in a step that in the add-remove programms, in the Windows XP-Software Updates section, I should find a Windows Media player thing which really doesnt exist and I suspect it's the Service Pack 3 because I have done the same in a SP2 and worked exactly as the steps said..Anyway the fact is I have Windows Media Player 0 now!!!
    Please someone tell why can't I upgrade my firmware... I can't deal with this anymore!!!!

    KRe: Zen Vision M Firmware Problem!!! Can't deal with this thing any more..._
    menios wrote:
    So you say that I actually have the Windows Media Player 0, because my Zen is being recognised..
    I have rebooted it several times but its just the same thing...it shows firmware problem!!
    Why isn't this player working?I've seen many people, not only from here, who have the same exact problem and they gave up on their mp3... I dont have this kind of luxury to buy a new one!!I don't know whether Creative has put on this a "time bomb" or is just faulty, but I really wish it could be saved..
    I'm saying it is WMP0 because the firmware file sees the player. The computer can recognize it but with WMP components that firmware file would be grayed-out..So when you reloaded the firmware did you choose "reload firmware" Before you connected it's?(That is what erases the firmware prior to uploading the firmware. If you did not do that it could cause it to fail.Do these ste
    ps.
    Open the firmware file,On the player format>cleanup>choose reload firmware, then connect & run the firmware file.

  • TS1436 I received this message twice on 2 new & separate attempts to burn a playlist to a NEW cd:  "The attempt to burn a disc failed.  The burn failed because of a medium write error."  What is a "medium write error" and how can I deal with this?

    I received this message twice on 2 new & separate attempts to burn a playlist to a NEW cd:  "The attempt to burn a disc failed.  The burn failed because of a medium write error."  What is a "medium write error" and how can I deal with this?

    Hello Pat,
    The following article provides troublehsooting steps and information that can help get iTunes burning discs again.
    Can't burn a CD in iTunes for Windows
    http://support.apple.com/kb/TS1436
    Cheers,
    Allen

  • Can Apple make an app or an update that makes you insert your password to turn your phone off? This can help deal with theft of iPhones because people take or find a iPhone, the first thing they do is turn the phone off.

    Can Apple make an app or an update that makes you insert your password to turn your phone off? This can help deal with theft of iPhones because people take or find a iPhone, the first thing they do is turn the phone off.

    They probably can do such s thing if they choose to do so.
    Let them know that you would like this:
    http://www.apple.com/feedback
    Not sure this is a very useful thing.  It would run down the battery.  All a thief has to do is remove them SIM and restore the iphone to stop it from being tracked.

  • Good evening, Have been buying ipad4 device used by a licensed legal place in the UAE during use shows that locked the machine by the previous user's icloud I can not deal with it, please help

    Good evening,
    Have been buying ipad4 device used by a licensed legal place in the UAE during use shows that locked the machine by the previous user's icloud I can not deal with it, please help

    amr35 wrote:
    But I want to figure out a solution to this problem because I was not able to get to the first user because I did not know this person, or access to the store where you purchased the working conditions, please help because I had paid an exorbitant amount to buy
    There is no solution other than having the device cleared by the former owner. If you are trying to activate an iPad or iPhone and it is asking for a previous owners Apple ID and password, you have encountered the Activation Lock. This is a security feature that prevents thieves from setting up and using a stolen or lost iPad or iPhone. You have no alternative. You must contact the previous owner to get permission to use the device. If you cannot contact the previous owner return the device to where you bought it and get a refund. You will never be able to activate the device and no one can help you do it.

  • How do i deal with multiple iPhoto libraries when migrating to Photos

    how do i deal with multiple iPhoto libraries when migrating to Photos

    I would merge them before the migration.  Also, spend some time doing any batch changes of names and dates beforehand too.
    iPhoto Library Manager has good merge and duplicate search facilities.
    http://www.fatcatsoftware.com/iplm/

  • Can FCExpress deal with 720 50p..

    Hey guys,
    just wondering can FCExpress deal with 720 50p. I have a Panasonic AG-HMC 41 (40) and when shooting with 720 50p I'm not seeing any great difference especially when I try to slow down the footage. It looks as if its not capturing the full 50 fps. I really want great looking slow motion footage.
    I use iMovie to import all my footage.
    If I upgrade to FCPro will that solve my problem?
    I love FCExpress but also use slow motion a lot and would happily up grade to FCPro if it means I could get better looking Slow Mo.
    Thank in advance..

    Thank you so much for that.
    Looks like I'll just have to save and splash out on FCPro.
    I'm guessing by the way you say 'reconform the frame rate' to make movies slow mo' it's not as simple as hitting 'Apple key & J' and selecting your required speed.

Maybe you are looking for

  • Photoshop CS4 Freezes when opening PDFs

    When I drag two, 2-page PDFs onto Photoshop CS4 to open them, PS opens one page of one PDF and then freezes. I can replicate this every time I try. Once PS freezes it takes a little patience to get it to force quit. Any advice?

  • IPad Video App- Titles Not Displaying

    Hello.. I've synced some movies to my iPad and in the Video app, the Movies used to have names underneath the cover art. For some reason, it's not being displayed. I don't know why this is happening. This did start after I signed up with iTunes Match

  • Java Web Start - java.lang.NullPointerException (XI 3.0, SP9)

    Hi all - whenever I try to execute the Integration Builder Directory or Configuration by Java Web Start, I get the following exception after completly donwnloading the .jnlp files: java.lang.NullPointerException at com.sap.plaf.frog.FrogScrollPaneUI$

  • Transport hierchies and sourcesystem

    hi friends, how can i transport hierchies and source system from development to quality in bi 7.0 Thanking u suneel.

  • Oracle Database 10g Express Edition and xmlelement

    Hi when i tried to execute the following Sql command on a Oracle Database 10g Express Edition select level,xmlelement(evalname(desc), value1) from hr.xml_local connect by prior id = id - 1 start with level = 1 i got this error: ORA-19039: The keyword