The problem in JComboBox, help!

Hi,
My case is to forbid the users using Up and Down arrow key to access items in the list, but they can still use mouse to access items.
But after I tried several ways, I still can't achieve that. I am using a editable comboBox. So, even my focus is in JTextField, when I press Up and Down arrow keys, the item list was still displayed on the screen. I don't want them appear, but only with mouse at that time.
Does anybody know how to fix that?
Many Thanks!
Feng

Try this code.
regards,
Stas
JComboBox cb;
        KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0);
        cb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(ks, "MoveUp");
        cb.getActionMap().put("MoveUp", new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("up key pressed");
        ks = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0);
        cb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(ks, "MoveDown");
        cb.getActionMap().put("MoveDown", new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("down key pressed");
        });

Similar Messages

  • How come my external hard drive is no longer visible in finder even after ticking it in preferences? it shows in the disk utilities but does not allow me to find a problem or fix the problem? Please help.

    it shows in the disk utilities but does not allow me to find a problem or fix the problem? Please help. also my external hard drive is a seagate free agent go, 500GB. it is visible on my tv but has no files in it… i'm scared i've lost everything?

    Honestly i cannot remember sorry, i got it like 5 maybe 6 yrs ago and just started downloading things to it as the memory on the computer started filling up and when i wanted to see photos/videos on my TV.
    My wife did tell me after i had written this post that she did try and record TV to it as it was plugged in. I think by doing so somehow has deleted everything.   It reads on my TV yet has no files in it but won't show up on my computer. hope this helps.
    Starting to think it is going to cost more to retrieve files on it than it will be to buy a newer and larger one.

  • My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help.

    My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help. I can't find my answer on the Internet.

    By far the most common problem hardware-wise seems to be scuffs on the aluminium. Yours is the first report of a faulty screen I've seen.
    If you use the same Apple ID on both devices it'll sync whatever you want it to - music/apps/photos/messages/etc.
    I've just switched from a Galaxy S3 to iPhone 5 (having already owned an iPad for a while) so I'm in a similar position!

  • Most of my e-mail goes to Junk e-mail..please help! I have tried the rules...I don't see any rules to be removed. I went to the Apple store and they couldn't revolve the problem ...Help!!!

    Hello, I'm new in Apple Support Communities
    Most of my e-mail goes to Junk e-mail..! I have tried the rules suggestion as soluiton of the problem, but I don't see any rules to be removed. I went to the Apple store and they couldn't resolve the problem ...Help!!! Any other suggestion?

    Is it being marked by your email provider? Check the raw headers and see if there is an x-spam header.
    If so, you can disable Mail trusting spam headers in the Junk preferences.

  • My music seems to be frozen - it's trying to play something but just keeps scrolling my library. I've tried resetting but the problem persists. Help !!

    My music seems to be frozen - it's trying to play something but just keeps scrolling my library. I've tried resetting but the problem persists. Help !!

    Make sure that all of your music is in iTunes. Once you have made sure that all of the music that is on your phone is on the computer that you sync with, go to Settings>General>Usage, slide your finger from left to right across the music portion, delete the library, restart the phone, then sync the library back to your phone via iTunes.

  • I have bought and downloaded the new iphoto but it is not installing. I have restarted my computer and the problem continues. Help!

    I have bought and downloaded the new iphoto but it is not installing. I have restarted my computer and the problem continues. Help!

    can you describe exactly what is happening? And give exact error messages
    LN

  • Tried to access programs and get Error: 16 message. What's the problem? Please help!

    Tried to access programs and get Error: 16 message. What's the problem? Please help! Photoshop, photoshop elements, Dreamweaver - none of my Creative Cloud apps will start-up, since my last update. I need to access these programs for jobs I'm working on.

    Hi wdriver,
    It seems like due to some unknown reason permission from the Licensing folder is removed. Please try launching any of the apps by right clicking and select Run as an Administrator, it should fix the issue by doing that.
    Please let us know if it helps.
    Regards,
    Abhijit

  • My ipad is connected to my wifi, however when i try to sign my ipad into facetime is says that it is having trouble connecting. I use my wifi to get on the internet on my iPad so i have no idea what the problem is. Help Me

    My ipad is connected to my wifi, however when i try to sign my ipad into facetime is says that it is having trouble connecting. I use my wifi to get on the internet on my iPad so i have no idea what the problem is. Help Me

    - Did it successfully connect to the network before?
    - Do other devices successfully connect to the network now?
    - Does you iPod successfully connect to other networks?
    - Have you reset your iPod?
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Reset network connections: Settings>General>Reset>Reset Network Settings
    - Powered off and then back on your router
    - The troubleshooting here:
    iPhone and iPod touch: Troubleshooting Wi-Fi networks and connections
    -When you restored you iPod did you restore to factory defaults/new iPod?  If not try that.
    - If you look at the network properties on the iPod what IP address is assigned when you think you are connected but actually have no internet connection.  If it starts with 169 then the iPod never connected to the router, the 169 address are self assigned.

  • Is my iPhone 4 greyed out wifi and non working bluetooth software or hardware... seems that the forums are full of this issue with no consistent or official answer. is it all coincidence that so many are having the problem? Please help...

    Is my iPhone 4 greyed out wifi and non working bluetooth software or hardware... seems that the forums are full of this issue with no consistent or official answer. is it all coincidence that so many are having the problem? Please help... I have scoured the net trying everything the last few days.

    Please correct your porfile: iPhone 4 do not have IOS 6.1.4.
    The usual troubleshooting steps are, also remember to test it after every step:
    1. Restart
    2. Reset
    3. Restore from backup
    4. Restore as new.
    If no joy, make an Appointment with the Apple genius and have them evaluate

  • I have already downloaded the ios 7 but cannot access the iTunes Radio from the music app. There is no iTunes Radio icon at all! How did that happen? How can I resolve the problem? Please help. Thanks!

    I have already downloaded the ios 7 but cannot access the iTunes Radio from the music app. There is no iTunes Radio icon at all! How did that happen? How can I resolve the problem? Please help. Thanks!

    It didn't show up in my music app for several hours.   Don't know why... But it's there.
    I can now access and add stations through the iTunes Store to play through music app icon.

  • HT1277 why i cannot set up my exchange account into my iphone 4s.  everything that needs to input has been provided right, but error says cannot get email not connected to the srver.where seems to be the problem?pls help.btw,i have an outlook for macbook

    please help me find out the solution to the problem.
    My iphone 4S was not able to fetch mails from the server ( outgoing and incoming)
    I was trying to configure my exchange account and follow all the procedures correctly but am having trouble in sending and receiving mails as the error says " cant get mails cannot connect to the server?  where seems to be the problem?
    Have read from the support services that if you using a Pop3 account into another device which I did ( my email was configured via outlook for mac in my macbook) there might be a lock out problem and cannot get emails on the second device which is my iphone?  ( I want to set up my exchange account to my iphone so wherever and whenever i go i cant still access to my email easily. Please help.

    No one seems to be hearing what Big Q is saying.
    He can pair his iPhone to his Macbook, but cannot CONNECT. He's NOT asking for alternative solutions, like Wi Fi.
    I am able to both pair and connect my one one Macbook to my other one, but I can only pair but not connect my iPhone or iPad to either Macbook. So I have the same problem. But I can pair and connect my Macbooks to other Bluetooth devices, like my ancient Nokia cellfone, or my Bluetooth HP printer.
    It's irrelavent that I can instead use a direct USB cable or Wi Fi between my Macbooks and my iPhone/iPad - why can't I use Bluetooth? If Apple does not allow Bluetooth between it's Macbooks and other Mac devices, then why have Bluetooth at all? Does my iPhone have Bluetooth only so that I can pair and connect to my my non Apple mobile handsfree car kit, or communicate easily with the dreaded Apple enemy Samsung, or what?
    Make no mistake , I am a diehard Apple fan, but this Bluetooth non compatibility issue appears shortsighted and seemingly pointless. Why does Apple not just say why they created the non compatibility, or have a message on the Bluetooth setup programme which simply and clearly says "don't bother wasting hours of your time trying to pair and connect your iPhone to your Macbook, because we don't allow that anymore, reason being that............"?
    As a first time user of this Forum I am surprised at the intolerant and highhanded tone of some of the replies  to what is a legitimate question, that is obviously plagueing many, many other Apple users.

  • Hi There, my itunes no longer opens.  It quits unexpectedly for some reason when I try to login.  I have tried updating my itunes and this has not solved the problem.  Any help would be appreciated, thanks

    Hi There,
    My itunes quits unexpectedly when I try to login.  I cannot even open the application, not sure why this is happening.  Have upgraded my itunes and this has not solved the problem either.  If anyone can help me out, that would be appreciated.  Thanks

    Hello balisurfergal,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Mac OS X 10.6: If an application quits unexpectedly
    http://support.apple.com/kb/PH7044
    iTunes 10 for Mac: May quit unexpectedly on launch
    http://support.apple.com/kb/TS3494
    Have a nice day,
    Mario

  • TS3367 Cannot log into FaceTime using correct apple ID, tried several times and restarted numerous times as per messages posted on apple community postings still nothing seems to solve the problem! Please help!

    Tried to log into my FaceTime account, but keep on getting "password incorrect" message. Restarted iPad as suggested by posted comments but still no positive result. Tried alternative email accounts such as @me.com but also no positive result. Please help.

    Well after two attempts at trying to repair Facetime and iMessage by restoring my iPad, I am still left with the same outcome, no Facetime or iMessage. What I think has happened is when I first set up my iPad I used a different password, now that i have changed my password and cannot remember the old one I cannot access eitehr application. Whast strange is that you would think that when changing my password it would change the password on all devices when doing the synch from iTunes. For some reason this has not happened and the old password is still intact in Facetime and iMessage. I even tried backing up twice, the first time from iCloud and secondly from my Mac but even this has not resolved the problem. I also set up my iPad as a "new" iPad and this also had no impact. still struggling to resolve this, would appreciate help if anyone out there has a solution or something else I can try. i have run out of ideas.

  • I followed solution to fixing the problem of pogo games not working by re-installing Firefox 3.6.13 but I am still having the problem. Please help. thank you.

    I tried fixing the problem of not being able to access the card site of pogo.com by following the 'How do I re-install Firefox 3.6.13. But alas the pogo game is still is not loading.

    This is my solution, and it didn't come easily. After days of turning myself and my computer inside out, I remembered that AVG (antivirus) installed an update a few days ago and realized that's when my Pogo card games trouble started. So I went and disabled the AVG and checked the games. The games loaded! I went into the AVG settings and was able to revert to the previous version. Now I'll have to rethink AVG, but I can play Pogo games once again! Hope this helps.

  • My iMovie is not working, it tells me there's a problem but does not know the problem, Can someone help me figure this out please?

    A couple of days ago, my I opened up my iMovie and it just goes into the blank screen. I am able to click on things like, "import" or "create" and it will take me into the next window, but when I choose an option, I receive a message that there is a problem, but they don't know what the problem is. It has been like this for the past couple of days. I have deleted and re-downloaded the app about 3 times and it still comes out the same. Please assist in any way possible!

    Try a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    When it's rebooted you can force a backup via Settings > iCLoud

Maybe you are looking for

  • Form appears even when physical copy deleted and cache cleared.

    I am running an application on the oracle application server (Oracle 10G Release 2 10.2.0.1.0). When I load up my initial form sometimes it runs the correct version of the menu i.e. the one in the forms_path and sometimes it runs an old version which

  • Material Group in ALV

    Hi to all         i have a problem in ALV, when i entered the material group 01, it takes the material from the material group 01 as well as other material group(with the values has null).i like to know how to delete the materials from other group if

  • Maintaining connection from PC to aiorport express

    I have a airport express connected to a router. When I start my PC it connects immediaetly without any trouble but after some time (20 to 30 minutes usually) the connection drops out. It does not appear to be a problem with the wireles network equipm

  • When will we have ringtones for texts/voicemail?

    Seriously, this is totes redonk! My old Motorola Razor had this capability and that was like 8 years ago. For being the cellphone of "the future" it sure seems awfully behind in terms of technology! Just last month we barely got the ability to send p

  • Oracle Database 10g Express Edition with openSUSE 10.3 ?

    The install guide for Oracle Database 10g Express Edition say it requires Suse SLES-9 . Does any know if Express Edition can be installed on openSUSE 10.3 ? Thanks in advance.