JComboBox selection and highlight problem of the selected item

Hi,
I have a question how can I make my newly added item to the combo-box selectable and highlighted. I am adding new items to my custom comboBox dynamically and I want whatever item I add to be selected by default. I am using my own custom ComboBoxModel that extends AbstractListModel and implements ComboBoxModel and TreeModelListener, and my custom Renderer that extends JLabel and implements ListCellRenderer. Because I am trying to get a tree structure in my comboBox model and that's why I have my own custom model and renderer. Now when I add a new node or item to my comboBox it is being added and shown in the combo-box textField, but as soon I pull down the combo-box my parent directory is selected though my current selection is the last node added. That's how I am adding new nodes and making it selectable
treeModel.insertNodeInto(tempNode, (DefaultMutableTreeNode)nodeCollection.lastElement(), 0);
int nodeTotal =((CMRGlobals.myTreeGlobals).getModel()).getSize();
Object lastNode = CMRGlobals.myTreeGlobals).getModel()).getElementAt(nodeTotal - 1);
((CMRGlobals.myTreeGlobals).getModel()).setSelectedItem(lastNode);
when I do this my node is added under my parentNode and is shown in the comboBox but when I try to pull down the combo my parent node is high lighted and when I move out of the combo-box my parent node gets selected and show in the combo-box though I haven't selected it,and the contents of my last node are shown. I am just writing my own custom model that simulates the effect of JTree. I am using these......
DefaultMutableTreeNode and
DefaultTreeModel
and in my JComboBox I am setting my model as
this.setModel(new myModel(treemodel));
this.setRenderer(new myRenderer());
I am building my own FileDialog that just works like FileDialog I have all the functionality except this problem.Thanks for any help. I know I have posted this same thread yesterday but I didn't get any response hoping now may somebody can help me.Thanks again

never mind I got it
Thanks

Similar Messages

  • I am updating iphoto 9.1 to 9.3 and every time when I clicked for update aps store asked to open it in the account where you purchased. I am using the same account and its available in the purchased item of this account. Can someone resolve this problem.

    I am updating iphoto 9.1 to 9.3 and every time when I clicked for update aps store asked to open it in the account where you purchased. I am using the same account and its available in the purchased item of this account. But in my purchased item library it indicates that you update iPhoto. I am not sure which account the aps store asking. Can someone resolve this problem.

    Contact App Store support. They're the folks who can help with Account issues.
    Regards
    TD

  • I have an iMac OS X 10.6.8 and have problems with the backup Disk for Time Machine disconnecting itself with the message that I ejected it improperly.. It ejected itself - why?

    I have an iMac OS X 10.6.8 and have problems with the backup drive to Time Machine ejecting itself and so does not automatically backup the way it is meant to do. It is connected with an USB cable to my iMac. What could cause this - malfuntioning drive?

    The "iLife" apps are not part of any Mac operating system install and are a separate purchase.
    Once you get past 10.6.6 you can purchase and download iPhoto, GarageBand and iMovie. iWeb and iDVD have been discontinued.
    Snow Leopard 10.6.6 and higher include the App Store application which is what you use to purchase Lion.

  • I want to ask about iphone that the facetime is not working in UAE is that a problem ? and this problem affect the front camera "hardware"?

    i want to ask about iphone that the facetime is not working in UAE is that a problem ? and this problem affect the front camera "hardware"?

    minaaemile wrote:
    there somting is like not clear so  i think that the blocking of factime is affect the front camera so i want be sure if the front camera of iphone from UAE is like any iphone from another country and have the same quality ??
    The front-facing camera is available for use even without FaceTime.  If you are having issues with your front-facing camera, I suggest troubleshooting the issue:
    Basic Troubleshooting Steps when all else fails
    - Quit the App by opening multi-tasking bar, and swiping the App upward to make it disappear.  (For iOS 6 older, hold down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.)
    - Relaunch the App and try again.
    - Restart the device. http://support.apple.com/kb/ht1430
    - Reset the device. (Same article as above.)
    - Reset All Settings (Settings > General > Reset > Reset All Settings)
    - Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    - Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    - Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

  • Why is my iphone 5 having network and battery problems after the ios 6.1.2?

    why is my iphone 5 having network and battery problems after the ios 6.1.2?

    I also forgot to mention that when it did have power, it wouldn't let me shut it off to try and conserve the battery life. Right when it powered down it would power right back up.

  • I downloaded illustrator and can't read the taskbar items - too tiny. Help!

    i downloaded illustrator and can't read the taskbar items - too tiny. Help! zoom doesn't work- it's grayed out. control key and mouse wheel doesn't work. Please help no tech support for the next 2 days. I am a member of the creative cloud and have yet to be able to use any of this software!

    Be more precise and tell us the exact details. If you have issues with items being too small, your graphics settings and all that are critical, don't you think? Sorry, but just saying you're on some HP laptop with Win 7 is not helpful. Follow the instructions to obtain exact system info:
    Working with your Operating System’s Tools
    Also provide a fullscreen screenshot, if possible.
    Mylenium

  • Performance and Contention problem with the database ?

    Hello!
    I am having one database which is used by around 95 thousand
    users.Database contain about 4 lakh records. The database is
    going smooth and perfect.
    The problem(perfomance is slow and there is contension too) came
    when i made 4 web applications which contain atleast 1000 hits
    (1000 records are inserted in the database ) per day.
    Now the db is not going so smooth(contention and performance
    problem).
    I think this is happening becuase of those 4 web applications.
    So should i make new database for that 4 applications or i need
    to get the new system for it or there is another way through i
    can tune my running database.
    Any help will be appreciated.
    Regards
    Seemab

    Hi,
    If i well understand, u have one database and u insert 4000 rows
    per day and u have performance problem ?
    I think u have a big problem cause it's not really a big
    intensity on a base. So u should have big problems on ur
    database design such as undersized memory area, bad disk
    repartition, bad types of indexes or something like that.
    To decrease the contention, u should separate ur data and index
    datafiles over differents disks and specialize tablespace by the
    granularity of the table.
    But u r not enough precise to expect a precise answer; could u
    be more precise ? as the server u have, data volumes, a select *
    from v$system_event, etc...
    Good Luck,
    Fred DENIS

  • Just purchased Wndows Vista and having problems with the port for Palm 125

    I just purchased a Windows Vista computer and having problems with getting my Palm 125 to sync with the desktop.  I get an error message saying:  "Com1 not available"  What do I do?
    Thanks,
    Frustrated
    Post relates to: Palm m125
    This question was solved.
    View Solution.

    Sorry, that didn't work.  I get no drop down menu from the Hot Sync Manager for the Serial Port.  What comes up often is:  "The selected port, COM1, is not available at this time.  Hot Sync Manager will open the port when it becomes available." 
    Could it be the Norton Antivirus Firewall that is preventing the Hot Sync Manager to open the Serial Port?  Just a thought.  Thanks for your help.
    Post relates to: Palm m125

  • I use an iMac (27" 3.4) and have problems with the Magic Mouse. It does not use contact, but opens useless and unrelated submenus with every click, even on the empty desktop. I can't shift, open or close pages. Has anyone out there the same problem?

    I use an iMac 27" (mid 2011). Until recently I had OSX 10.6.8 installed, but both, the HDD and SSD had to be replaced, and I lost all the memory.
    After the repair through Apple Care I had OSX 10.7.5. (Lion) installed, which developed a Magic Mouse problem.
    Unlike with most users, I have no problems with connection, but grapple with a different kind of erratic behaviour.
    All fancy stuff is turned off in the mouse preferences. When I try to move, open or close pages, unrelated submenus pop up and hinder the
    required task. No matter how often I click, these menus stay there, and they even come up when clicking on the bare desktop.
    It renders the mouse absolutely useless, as no work can be done with it.
    The first 'Magic Mouse' had depleted batteries every few days, despite switching it off after use.
    I was supplied a new Mouse, which does better battery-wise, but the problems are the same. I can't get a result by clicking on any link, due to
    the pop-up menus, so both 'Magic Mice' are totally useless.
    At present I am using the old USB mouse from my Mac Pro, and that works still o.k.
    The problem are not the mice, but the software. The first 2 weeks after installation of OSX 10.7.5 the Magic Mouse worked though.
    I have no idea as to what the reason may be.
    Has anyone in the community ever experienced that particular problem. Any hint would be welcomed.
    Thank you!

    Not using any mouse pad, I have a very smooth desktop. But I just tried to use a sheet of A4 printing paper, but no result, the problem persisted.
    Someone on this forum suggested, that USB3 may interfere with the magic mouse.
    I have 2 LaCie HDD's about 70 cm away from the mouse, I use them on Thunderbolt. But in operation or not - the result is the same, the mouse plays up! Just now I was clicking the desktop and the mouse created a new folder!!
    Thanks for the advice, Bee
    Cheers, Gerd

  • Performance (slow) and (maybe) problems doing the troubleshooting steps

    I had noticed Time Machine backups taking longer and having more of a performance hit when they were happening, so I decided to check things out.
    Based on some forum postings, I decided to try some of the steps outlined in the main "troubleshooting" thread.
    Bottom line: I ended up at the Repair/Verify Disk step (A5) in the troubleshooting steps and since I'm using a Time Capsule, proceeded with (trying) to run a repair on the sparse bundle. Opened things up, but when I tried to " . . . mount the sparse bundle by opening the TC in the Finder and double-clicking on the sparse bundle" things seemed to hang.
    I have a window indicating it is opening the sparse bundle (name seems correct), but it has been doing this for over half an hour without any visible progress. All I have is a process bar and "Checking Volumes..." (I do have cancel & skip as options.)
    I'm loath to cancel or skip as it is possible that taking this long is normal.
    Can anyone give me an idea how long to expect this to take and/or if it won't open properly, suggest a next step to try?
    Thanks in advance,

    Here's the logs (I confess, I forgot to check that when it wasn't in the visible window).
    2010-03-03 15:34:22 -0500: Disk Utility started.
    2010-03-03 15:34:31 -0500: Verify and Repair volume “Backup of Chris Huntington’s Computer”
    Starting repair tool: 2010-03-03 15:34:31 -0500
    2010-03-03 15:34:31 -0500: Checking Journaled HFS Plus volume.
    2010-03-03 15:34:31 -0500: Detected a case-sensitive catalog.
    2010-03-03 15:34:32 -0500: Checking Extents Overflow file.
    2010-03-03 15:34:32 -0500: Checking Catalog file.
    2010-03-03 15:52:44 -0500: Checking multi-linked files.
    2010-03-03 21:12:52 -0500: Checking Catalog hierarchy.
    2010-03-03 21:51:24 -0500: Checking Extended Attributes file.
    2010-03-03 21:53:06 -0500: Checking multi-linked directories.
    2010-03-03 23:22:27 -0500: Checking volume bitmap.
    2010-03-03 23:22:29 -0500: Checking volume information.
    2010-03-03 23:22:29 -0500: 2010-03-03 23:22:29 -0500: The volume Backup of Chris Huntington’s Computer appears to be OK.
    Repair tool completed: 2010-03-03 23:22:31 -0500
    2010-03-03 23:22:31 -0500:
    2010-03-03 23:22:31 -0500:
    2010-03-04 08:24:55 -0500: Attach Image “Chris Huntington’s Computer_001b63a90f4c.sparsebundle”
    2010-03-04 08:24:55 -0500: Initializing…
    2010-03-04 08:24:59 -0500: Operation canceled by user.
    2010-03-04 08:25:10 -0500: Attaching…
    2010-03-04 08:25:11 -0500: Checking volumes…
    2010-03-04 08:25:11 -0500: Volume check completed…
    2010-03-04 08:25:11 -0500: Attaching…
    2010-03-04 08:25:11 -0500: Finishing…
    2010-03-04 08:46:59 -0500: Verify and Repair volume “Backup of Chris Huntington’s Computer”
    Starting repair tool: 2010-03-04 08:46:59 -0500
    2010-03-04 08:46:59 -0500: Checking Journaled HFS Plus volume.
    2010-03-04 08:46:59 -0500: Detected a case-sensitive catalog.
    2010-03-04 08:46:59 -0500: Checking Extents Overflow file.
    2010-03-04 08:46:59 -0500: Checking Catalog file.
    2010-03-04 09:05:12 -0500: Checking multi-linked files.
    2010-03-04 11:35:50 -0500: Stopped by user
    Repair tool completed: 2010-03-04 11:35:56 -0500
    2010-03-04 11:35:56 -0500:
    2010-03-04 11:35:56 -0500:
    As you can see, I ended up aborting the second one after ~3 hours (99.9% of which was spent ~1/2 way done with 21 minutes as the estimated remaining time).
    Also, the first attempt took almost 8 hours(!) and didn't detect any errors.
    I see, re: reset. I'm pretty much in agreement that it's beginning to look like deleting the sparse bundle and just letting time machine take over (i.e. starting from scratch) is looking like the main option.
    I guess on one level, I'm back to the strangeness of my "problem." Everything, other than being really slow (including the disk utility check), seems to be working. On one level, I am paranoid that there is indeed a problem and worry that if I just ignore it, it will come back to bite me if I ever actually need to restore from the backup.
    Thanks again,

  • HIGHLIGHTING WORDS AND DICTIONARIES SUPPORT - Search and highlight words in the PDF documents

    One of the things that Adobe people don't understand very well, is they focus and focus and focus constantly in adding new "cool" features to the product... as more flash support... etc. etc.
    But Adobe still pending to make easier the life of people that work with tons and literally tons of PDF documents.
    Students, researchers, law professors, academics... they all need a solution to search and highlight in different colors, for certain words in a lot of documents.
    So here we have a challenge for the Adobe folks.
    Let's imagine you are working in a Law Office, ok? (you're lawyer, not programmer)
    You have a trial tomorrow...
    The trial is about robbery (for example)
    Now you are looking for Jurisprudence (other similar cases that were judged before)...
    And let's imagine you have a folder with 200 cases in 200 PDF files, talking about robbery, between the years 2005-2009
    Now, let's imagine you are interested to search the words:
    CONVICTION
    KIDNAPPING
    ASSAULT
    FAILURE
    CRIME
    SUBPOENA
    How do you do that Adobe folks?
    Reading the 200 documents? one by one, having to drink all the ink of the documents, line by line...
    Or, could you, please, allow Adobe Acrobat 10 can handle dictionaries of words, and allow the users, to search and highlight those words in folder of PDF documents.
    Of course!!! you'll tell me, oh, you can accomplish a search of the desired words and Acrobat will search them for you in a lot of documents in a folder...
    And I'll reply you! oh! that is not enough!
    And do you know why?
    Just simpley because I need to see all the information highlighted in a context...
    If I see the word CRIME in red close to FAILURE... also in red I can see that something wrong is happening with that trial, for example...
    Do you understand now that searching single words in a lot of documents is not enough, and you have to improve URGENTLY this feature?
    Highlighting the words the users need to search in a folder of documents, allow INTENSIVE RESEARCH AND SAVE HOURS AND DAYS AND EVEN MONTHS OF HARD WORK TO THE USERS.
    In that way, you don't have to read the whole document, you just go directly to the highlighted parts.
    I've been submitting this feature since Adobe Acrobat 6!!!! No one in Adobe listened to me!!!
    I sincerely don't know why these forums are opened, must be an idea of someone from marketing, because finally, Adobe don't implement any specification from the users.
    I am absolutely sure, Adobe folks will present the 10 version as something pretty cool, with more flash support and more graphic stuff.
    But, as always, withouth helping the real people that work extensively with large amounts of documents.
    So I hope, Sirs, Madams of Adobe, please, now yes, you give support to this feature once and for all !!!
    Thanks

    Adobe does listen to users, but it listens to 10 users more frequently than 1 user. It listens to 1000 users more frequently than 10. Get everyone you know that works for lawyers to post the request in the Adobe wish form (where Adobe tabulates user requests).
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Then maybe it will appear in Acrobat 11. If it is not in Acrobat 10 by now it is probably too late in the upgrade cycle for it to get in.

  • Spotify and facebook problem with the date

    Hi, everyone.My spotify account have a problem with the date. I changed the date on facebook and nothing happens with that, the spotify account has a wrong date, is not the same as facebook account

    Hi ,
    By default , RFC accept date format of SQL date (yyyy-mm-dd) . If you are using a date picker from WD, it directly set the date in SQL date format. Incase if you are trying to pass date to RFC in some other way you have to convert that into SQL date format before passing.
    if you are passing String date of format dd-mm-yyyy , you try this method to convert that to SQL date and pass to your RFC.
    public java.sql.Date sqlDateConvert( String date)  {
        //@@begin sqlDateConvert()
         java.sql.Date dateObj=null;
         try{     
              StringTokenizer tempStringTokenizer = new StringTokenizer(""+date,"-");          int dd=Integer.parseInt(tempStringTokenizer.nextToken().trim());
                                    int mm=Integer.parseInt(tempStringTokenizer.nextToken().trim());
              mm=mm-1;
              int yyyy=Integer.parseInt(tempStringTokenizer.nextToken().trim());
              Calendar cal =Calendar.getInstance();   
              cal.set(yyyy,mm,dd);                         
              dateObj = new java.sql.Date( cal.getTime().getTime());
         }catch(Exception e)
              return dateObj;
    Hope this will help you.

  • Scanner and fax problems with the Officejet 7410 AIO

    Hi
    I have Windows 7 SP1 Ultimate 64 bit and I installed the basic drivers for the network of the Officejet 7410 AIO printer and I checked that all its functions worked properly.
    Now, the functionality of the scanner and fax do not work more as in the "Devices and Printers" not appear more their relative icons. How come? How do I install them manually?
    Thanks
    Bye
    balubeto

    Hi balubeto,
    Welcome to the HP Forums!
    I see that you are having scanning, and faxing problems with your HP Officejet 7410 on Windows 7 SP1.
    I would recommend the following:
    Run the HP Print and Scan Doctor, to diagnose the issue.
    Uninstall the software. Uninstalling the Printer Software.
    Re-install the software using the HP Printer Install Wizard for Windows.
     Hope this helps, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • DDNS and UPnP Problems On the WVC80N Camera

    For weeks I've been having problems with the two things I mentioned in the subject field. I did talk to an Upper Level Tech Support from Linksys on Sunday, but she disabled my my UPnP on my Router, well that can't happen because if I do that then I might as well get rid of my TZO Account, which that will happen next month if I don't renew it. I keep getting error messages, it was on both of my WVC80N Cameras but now it's only on one of them. The message says the DDNS: Failed to get current public IP Address a little bit of that, but alot of this UPnP: Internet Gateway UPnP Discovery Failure. I have a WRT160N V3 Router, it still records on motion but if the UPnP problem keeps coming on it might not record when the problem occurs. I on TimeWarner Cable, can the problem be with them?
    Solved!
    Go to Solution.

    You have 2 WVC80N cameras.
    Let me know what are the IP addresses of your cameras and when do you get error?
    You have WRT160N router. Open the setup page of the router and check the Internet IP address on the status page of the router.
    Make sure that the proper ports are opened on your for both the cameras.
    Can you see the camera on the local network ?

  • Nokia N85, and my problems with the Nokia N96

    Hi there,
    First of all, i have both phones (after buying the n85, because of issues with the N96), when i go to send a large file from the n96 to the n85 via bluetooth, it wont allow it as it says not enough memory, it seems that you can only send, what free memory your phones internal system has, im deeply confused as the video im sending is over 88mb, and was passed down from my previous nokias without any problems whats so ever, any ideas anybody??????
    Secondly i feel a fool, as i bought like i said the n85 because of the problems with the and i quote" flagship model n96".... well, i can honestly say, ive wasted my money, because after installing the newest firmware 11 on it, it has since been running like a dream, albeit like it should have done last month, but i musnt grumble, now i need to decide which one to put on an auction site.
    ps the n96 was bought with 3 network, the other from an auction site, both work fantastically well with the 3 network.
    ashton

    Hi, beg to differ, I would sell the 96. The 85 is far better,OLED screen; a battery that lasts for days not hours; FM transmitter for when you are in your mates car who doesn't have a bluetooth radio; it breathes!!! is sleeker and of course it has a lens cover, for crying out loud why didn't they fit one to the 96!

Maybe you are looking for

  • How can I keep Lightroom 5 from taking up space on my local hard drive?

    I have a relatively large photo catalog (200k photos +) that I am in the process of paring down with the help of Lightroom 5.  Along the way I have kept certain groups of photos published to Flickr using Smart Photosets so that if I eliminate a dupli

  • How to use the "IN"  method in ejb3ql  -------variable of LIST

    public List findExamScoreinterface(List userid){ String connselect="select o from TCJExamScore o where o.userID IN(:userID)"; Query query=em.createQuery(connselect); query.setParameter("userID",userid); return query.getResultList(); It can not perfor

  • How do I view all the files on my start up disk?

    I'm trying to clean my startup disk. Ive deleted my history/downloads but Ive noticed that isnt enough space. So I wanted to see a list of all the items on my disk.

  • How do you rebuild the font database?

    I've been having big trouble with InDesign crashing everytime I print whether to an actual printer, distiller or to my desktop and have found that I need to rebuild my font database but don't know exactly how to do that. Can anyone help? mac pro   Ma

  • Where can I get 1.1.1?

    Hello, I was wondering if there was a website to download the 1.1.1 firmware? please post the link here! All help appreciated