JComboBox problem when traversing using arrow keys and it is editable

Hello,
The JComboBox I am using is editable and user needs to traverse the list using arrow keys as long as user is not selecting a particular item. But this is not achievable when combobox is editable. Any suggestion to get rid of that.
regards,
Ranjan

Huh?import java.awt.*;
import javax.swing.*;
public class Test3 extends JFrame {
  public Test3() {
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container content = getContentPane();
    JComboBox jcb = new JComboBox(new String[] {"One","Two","Three"});
    jcb.setEditable(true);
    content.add(jcb, BorderLayout.NORTH);
    setSize(100,100);
  public static void main(String[] args) { new Test3().setVisible(true); }
}

Similar Messages

  • Problems with scrolling through premiere timeline using arrow keys and shift arrow

    This is a really weird problem in cs6.
    When I load a clip into the source monitor i can scroll throughit fine using the arrow keys, and shift arrows and my shuttle pro controller.
    When I place the same clip on to the timeline it really struggles to scroll using the arrows or the shuttle pro, its really kerky and sdlwo to scroll the timeline, which is really frstrating, becuase it can play the footage fine in the source monitor.
    The clips will playback fine, but scrolling through them just doesn't work as it should any ideas?
    Cheers
    Mike

    I changed my shuttle settings to make the shuttling more responsive:
    1 - 5 times second
    2 - 10
    3 - 15
    4 - 30
    5 - 45
    6 - 60
    7 - fast as possible
    At least I changed this a long time ago - don't know if these are the defaults or not.
    It'll only shuttle as fast as your system is responsive of course - so if you get instantaneous scrubbing by dragging the CTI in the timeline with the mouse, you should be able to get good performance with the shuttle. Of course that performance depends on the type of footage and how demanding it is on CPU to decode and whether youi have effects applied etc etc etc.
    I edit pretty much exclusively with Sony XDCAM EX 1080P 25 footage we've shot on EX3 and PMW-350 etc and I get very very fast performance on the timeline - no issues at all i7 6 core 4GHz with 24Gb ram and fairly fast RAID array for footage.

  • 9.0 closes doc when I use arrow keys to scroll

    I appreciate any and all help with this.  When I use the arrow keys to scroll down (usually on the second time I hit the down arrow it closes) the document it closes abruptly, I got the pdf from IBM
    Thanks,
    Erik.

    yes right 9.1 gives more usability than the 9.0. you can page up and down option too to scroll. Its a benefit to use more advanced technology. enjoy it.
    [signature deleted]

  • Arrow keys and enter key not functioning in Firefox 3.6 when viewing PDF

    I'm using Adobe Reader 9.3.0.
    I have a web application that displays PDFs (using Adobe Reader) in a browser.  The PDF is loaded onto the page inside an IFRAME.  In addition to the IFRAME containing a PDF, the page also includes several forms, text fields, etc. For the most part this is working fine.  However, I have a glitch when using this in Firefox 3.6. I'm finding that certain keyboard events are being lost and I strongly suspect that they are being swallowed by Adobe Reader.  When I place focus on an HTML text field and press enter key or arrow keys, I do not get the appropriate key events.  If I run the exact same test without the PDF IFRAME these key events work correctly, but as soon as I load the PDF into the IFRAME they do not.  I believe the primary key event that gets lost is the keydown event.  I do get the keyup event.
    Again, the events work correctly up until I load the PDF onto the page.
    I've verified that this error does not occur in Firefox 3.5 and 3.0.
    Here is a testcase to reproduce this:
    <html>
    <head>
        <title>JavaScript - Detecting keystrokes</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <script type="text/javascript">
            var pdfURL = 'http://samplepdf.com/sample.pdf';
            window.onload = function () {
                init();
            document.defaultAction = true;
            function init() {
                var x = document.getElementById('testForm').getElementsByTagName('input');
                for (var i=0;i<x.length;i++) {
                    x[i].onclick = setEvents;
                    if (x[i].checked)
                        x[i].onclick();
                writeroot = document.getElementById('writeroot');
                document.getElementById('emptyWriteroot').onclick = function () {
                    writeroot.innerHTML = '';
                    return false;
            function setEvents() {
                if (this.id == 'default') {
                    document.defaultAction = !this.checked;
                    return;
                var eventHandler = (this.checked) ? detectEvent : empty;
                document.getElementById('textfield')['on'+this.id] = eventHandler;
                //document['on'+this.id] = eventHandler;
            function detectEvent(e) {
                var evt = e || window.event;
                writeData('<b>'+evt.type+'</b>:  keyCode=' + evt.keyCode+' : charCode=' + evt.charCode);
                return document.defaultAction;
            function empty() {
                // nothing
            var writeroot;
            function writeData(msg) {
                writeroot.innerHTML += msg + '<br />';
        </script>
        <style type="text/css">
            body {
                font-size: 12px;
            #writeroot {
                height: 300px;
                overflow: auto;
                border: 1px solid #2EB2DC;
        </style>
    </head>
    <body>
    <form id="testForm">
    <input type="checkbox" id="keydown" /> <label for="keydown">keydown</label><br />
    <input type="checkbox" id="keypress" /> <label for="keypress">keypress</label><br />
    <input type="checkbox" id="keyup" /> <label for="keyup">keyup</label><br />
    <input type="checkbox" id="default" /> <label for="default">Suppress default action</label><br />
    <input type="text" id="textfield" /><br />
    <button id="emptyWriteroot">Remove messages</button>
    </form>
    <a href="#" onclick="document.getElementById('docviewer-page').src=pdfURL;return false">Now load IFrame</a>
    <p id="writeroot"></p>
    <div id="container2" style="border:1px solid black;width:400px;height:200px">
            <iframe
                id='docviewer-page'
                name='docviewer-page'
                title='document page'
                src='http://www.google.com'
                align='left'
                width='100%'
                height='100%'
                scrolling='auto'
                frameborder=0></iframe>
    </div>
    </body>
    </html>
    Paste the above into an HTML document.  Open the HTML document in Firefox 3.6.  Check the four checkboxes.  Move into the text field and press arrow keys and enter key to observe the results when it is working correctly.  Then click on the "Now Load PDF" link.  Press the arrow keys and enter key again and observe that the behavior has changed.
    Anybody have any idea why this is happening or how to work around it?

    I found a workaround!
    By using an object tag instead of an iframe, all the keys seems to work fine and the PDF still renders in the page the same way.
    Here's a page that works:
    <html>
    <head>
        <title>JavaScript - Detecting keystrokes</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <script type="text/javascript">
            var pdfURL = 'http://samplepdf.com/sample.pdf';
            window.onload = function () {
                init();
            document.defaultAction = true;
            function init() {
                var x = document.getElementById('testForm').getElementsByTagName('input');
                for (var i=0;i<x.length;i++) {
                    x[i].onclick = setEvents;
                    if (x[i].checked)
                        x[i].onclick();
                writeroot = document.getElementById('writeroot');
                document.getElementById('emptyWriteroot').onclick = function () {
                    writeroot.innerHTML = '';
                    return false;
            function setEvents() {
                if (this.id == 'default') {
                    document.defaultAction = !this.checked;
                    return;
                var eventHandler = (this.checked) ? detectEvent : empty;
                document.getElementById('textfield')['on'+this.id] = eventHandler;
                //document['on'+this.id] = eventHandler;
            function detectEvent(e) {
                var evt = e || window.event;
                writeData('<b>'+evt.type+'</b>:  keyCode=' + evt.keyCode+' : charCode=' + evt.charCode);
                return document.defaultAction;
            function empty() {
                // nothing
            var writeroot;
            function writeData(msg) {
                writeroot.innerHTML += msg + '<br />';
        </script>
        <style type="text/css">
            body {
                font-size: 12px;
            #writeroot {
                height: 300px;
                overflow: auto;
                border: 1px solid #2EB2DC;
        </style>
    </head>
    <body>
    <form id="testForm">
    <input type="checkbox" id="keydown" /> <label for="keydown">keydown</label><br />
    <input type="checkbox" id="keypress" /> <label for="keypress">keypress</label><br />
    <input type="checkbox" id="keyup" /> <label for="keyup">keyup</label><br />
    <input type="checkbox" id="default" /> <label for="default">Suppress default action</label><br />
    <input type="text" id="textfield" /><br />
    <button id="emptyWriteroot">Remove messages</button>
    </form>
    <a href="#" onclick="document.getElementById('docviewer-page').data=pdfURL;return false">Now load IFrame</a>
    <p id="writeroot"></p>
    <div id="container2" style="border:1px solid black;width:400px;height:200px">
            <object
                id='docviewer-page'
                name='docviewer-page'
                title='document page'
                data='http://www.google.com'
                align='left'
                width='100%'
                height='100%'
                ></object>
    </div>
    </body>
    </html>

  • Acrobat X Pro 10.1.12 under Yosemite crashes when trying to use arrow keys to navigate.

    Acrobat X Pro 10.1.12 Mac
    Yosemite OS X 10.10.1
    Acrobat now crashes when attempting to use arrow keys to navigate. This is true on both MacBook Pro 15 retina and Mac Pro.

    I ended up upgrading to Acrobat XI. This works, but Adobe is up to its old tricks changing the interface from what we're used to using. They now have decided to hide all the tools. You have to delve deep into the program to find the tools, then set up your own tool menus. Lord help you finding a tool that you use too occasionally to put on a custom menu.
    Adobe has been doing this for years now. In Photoshop of olden days, it was simple to set up a brush, say, that you used frequently. Quite a few updates ago they made that vastly more difficult. And they've replaced words with happy little icons, that are not at all intuitive to use. I challenge you, too, to look at the icon for the airbrush and tell me whether it is on or off. (Sorry, this is mainly about Photoshop, but what they've done to the latest Acrobat is just as bad.)
    Of course, their ultimate cuteness in making things difficult for the user is their essential abandonment of a Help system. You can't do a simple look-up of a function -- you have to go to an internet site and sort through a bunch of forums and user comments to get any information.
    JEEZ Adobe!

  • I am unable to view google ads running alongside and under videos on YouTube. This is only a problem when I use Firefox. If I use another browser, I can see the ads. I do not have adlock as it does not appear in my plug-ins/add ons. Please help..

    I have been using Firefox for about two years. For about a month now I have been unable to view any Google advertisements that run on YouTube pages alongside and under videos. This is important for my business. I would like to stay with Firefox, but this is only a problem when I use Firefox and is not a problem with Internet Explorer or Google Chrome as I checked. I tried uninstalling Firefox and all plugs ins and add ons and then reinstalling it. This did not work. Firefox seems to be blocking the Google codes that enable the ads to run on the pages. I look forward to your help. Thank you.

    CS2 is very old and reached its "end of life" a while back.  So probably won't run on modern operating systems.  If you can still run it, you'll need to uninstall what you have and re-install with the download link below to activate it.
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Nancy O.

  • I used firefox 3.6.14 on windows 7 x64 (firxfox x32). I found a problem when I develop my website and alert data or value via javascript , firefox hang (not response) every time. What's happend? How to solve is problem?

    I used firefox 3.6.14 on windows 7 x64 (firxfox x32). I found a problem when I develop my website and alert data or value via javascript , firefox hang (not response) every time. What's happend? How to solve is problem?
    Thank you for help
    Lohkaeo

    Oops - for some reason, this problem now seems to have gone away. May have had something to do with Flash. I'll keep my fingers crossed.

  • I have a problem when I use the headphone. Music starts immediately and Siri starts as well

    I have a problem when I use the headphone. Music starts immediately and Siri starts as well

    I am having this issue also. It started after I downloaded You Tube apps.

  • After zooming in on an object using arrow keys to nudge, it crashes most of the time

    After zooming in on an object, using arrow keys to nudge, it crashes most of the time.
    Versions:
    Illustrator CS6, latest update
    Mac OS X 10.9.4
    FontAgent Pro 6.2
    Troubleshooting I've tried
    -trashed all related Illus. preferences
    -updated the only plug-in being used (FontAgent Pro), to the latest
    -disabled all but absolutely necessary fonts
    -repaired both system and user permissions
    -quit all other apps, so that only Illus. running.
    -fonts verified
    Was never a problem until a couple weeks ago, so the obvious question is "what changed?".  The two things we changed in the time period that the crashing started, is we replaced a balky external drive with a new one, and started our TimeMachine backups over again. And #2, we updated to the latest CS6 versions (due to other quirky issues).
    One odd thing to point out...perhaps is "normal", but in the crash reports, it's reporting that Illustrator is 16.0.0, but "About Illustrator" shows that it's 16.2.2.
    Everything else running fine on this iMac -- no reason to suspect it's the operating system.
    Has anyone run into this bug? If so, what have you done to fix this?
    I've not seen anything like this mentioned in Adobe's update change logs or their troubleshooting info.

    -> go to View Menu -> Toolbars -> select "Navigation Toolbar"
    -> go to View Menu -> Zoom -> click "Reset"
    -> go to View Menu -> Page Style -> select "Basic Page Style"
    -> go Tools Menu -> Clear Recent History -> Time range to clear: select EVERYTHING -> click Details (small arrow) button -> place Checkmarks on ALL Options -> click "Clear Now"
    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE any Unwanted/Suspicious Extension (add-ons) -> Restart Firefox
    You can enable the Trustworthy Add-ons later. Check and tell if its working.

  • Hi when i use treeMap class and if i exit the program

    hi
    hi when i use treeMap class and if i exit the program,
    what will happen? the information that i put in the treeMap will be disappear??
    if it is like that,,how am i able to retrieve my data...when i restart my program..
    once i put ID as key and put my customer information,
    in it, after exit my program,, and i can't find
    my customers by their ID,,,,,,,,,how can,,i solve it......

    what will happen? the information that i put in the
    treeMap will be disappear??Yes. Of course. If you want data to hang around you have to tell the computer. If you want anything to happen you have to tell the computer.
    if it is like that,,how am i able to retrieve my
    data...when i restart my program..Tada! Tell the computer. Your simplest option is to use Serialization.
    Before exiting your program, serialize your TreeMap to disk. After starting your program serialize your TreeMap from disk.
    First stop should be your text book to learn what Serialization is and how it works, then try to write some code, then ask us to help with any problems.
    Dave.

  • Is There a List of Keyboard Shortcuts for Adobe Digital Editions, I Found Two By Accident the "Arrow" Keys and the "Enter Key" for Turning Pages in an eBook...

    Hi  ??  :       Does Anyone Know If There is a List of Keyboard Shortcuts for Adobe Digital Editions, I Found/Discovered Two By Accident the “Arrow” Keys and the “Enter Key” for Turning Pages in an eBook...   Thanks
    I Did Look for this Keyboard Shortcuts in Adobe Digital Editions Help & FAQ Areas and Got the Run Around, Very Hard to Find How Use Adobe Products !!
    Microsoft Windows Vista & Win 7 Operating Systems
    Message was edited by: Al Adams

    Nope, I doubt it.  As I said:
    I disabled Aero theme, checked font scaling was 100% and rebooted Windows in between all of the steps to no avail.
    I've been reading a lot around this and it seems the arrow key problem is a red herring; I think it's just some kind of terminal preferences corruption.

  • BI web use ARROW Keys

    Hello Everyone,
    I am in process of moving planning from Excel to IP with one of my client. Client wants to use ARROW keys to scroll left and right on layout beside using TAB.
    Can anyone help on this if you are aware how to add this functionality in BI Web ??
    Regards,
    Jasmi

    Daniel,
    I am assigning you points for your answer in other forum thread "Input functionality".
    We have one more requirement, when entering data, system should prompt "SAVE DATA" if user tries to navigate to other screen or close browser by mistake. Is it possible, if by any chance you are aware about it ??
    Also is it possible to copy same value across entire layout row / distribute equally by any button or function as we have layout for 24 months ??
    Regards,
    Jasmi

  • When I use yahoo images and i open an image in a new window, it tweakes out firefox so that panes are distorted and exerything, the whole firefox browser looks like an F5 tornado took it apart and lumped it on my desktop... is this a known glitch?

    When I use yahoo images and open an image in a new window, the page, once I click its tab causes the entire browser to scramble graphically, making it nearly impossible to navigate further. I right-clicked and selected close tab. That regains the visual clarity of the browser. But how can I fix this to browse the images?

    Phillipp,
    I tried it again using "save link as", and this time it actually worked! I just now downloaded several more using the "save link as" option, and it works perfectly. Thanks. Problem solved.
    Littleberry

  • Overhead calculation not happening after using Overhead key and orgin group

    overhead calculation not happening after using Overhead key and orgin group.
    There was a runtime error earlier related to u201Cdefine credit u201C IMG node under costing sheet component and we have applied SAP note 769946 and that error was gone out of the way
    We want to apply/add Overhead to SFG/FG materials.
    We are using PP order with PCC(product cost collector) as the cost object , i.e costing by period.(system ECC 6)
    But our problem is with material standard cost estimate process.
    We have assigned overhead keys to the percentage rates in costing sheet for material standard costing and assigned the origin groups to the credits of costing sheet. But after running the cost estimate overhead is not taking into account for standard cost calculation.
    In the define credit entry table key field is valid to date strangly and actually system should allow one than one entry with same valid to date and same sec.Cost element(type-41) for different cost centers.
    But if we without using overhead key and origin group, the entire cost in that supporting cost center will come to all materials (SFG/FG) and we can not distinguish between different product materials(SFG /FG).
    We have checked all things as mentined below.
    Firstly that the correct costing sheet is assigned to the valuation
    variant.
    That the costing sheet is entered for the appropriate material type:
    Finished and semi finished or material components.
    All of the above can be checked and verified via transaction OKKN.
    In addition make sure that the base value maintained is present in the
    costing, for example the base may include an Origin group, is that
    origin group part of the materials being costed?
    Similarly if the base is found and values exist how is the overhead
    rate of the costing sheet set up, is it valid etc.
    And finally do a similar check for the credit.
    we doubt this as a programm error...
    So, request all experts to have ur feedback..

    Dear,
    Check your origin group & material unit of mesaurement is same.
    some time in costing sheet origin group is maintain in different unit & for materail it's maitain in other unit of mesaurement.
    You can see unit of measure for material in Additional data - unit of measure.
    Check BOM component material unit also.
    Check same  unit of measure is maintain in KZS2
    I hope above will useful.
    GOPAN

  • I just bought iWorks Serial Number Key over the internet. When I use the key, iWorks tells me the key is invalid!! Please help. (I bought this iWorks from someone in Singapore. I am using it in Malaysia)

    I just bought iWorks Serial Number Key over the internet. When I use the key, iWorks keep telling me the key is invalid!! Please help. (I bought this iWorks from someone in Singapore. I am using it in Malaysia.). Thanks

    Downloaded the Trial version. It still says the serial number key is invalid. On the iWork page where I am suppose to enter the serial number key, the "Go Back" button is always BOLD, but the "Continue" button remains GREY all the time. The "Continue" button remains grey even after I have completed the key entry. I have to type the "Return" key on my keyboard to force enter the key. The message I get is still "Invalid key".
    I have called Apple. The first person helped by asking me to delete certain items in some Folders and it still did not work. I was then connected to a senior person, but I heard over the recording that there were 15 persons waiting on the line. I had to end the call because the wait will take too long.

Maybe you are looking for

  • Writing to A text file that is located on an online directory.

    I have an application that several users will be using. The program outputs a string when a submit button is clicked. I have a txt file called Data.txt which resides on a web directory with the following url. http://nath5.hostrator.com/............/D

  • HT1420 How can I get a list of authorized computers

    How do I get a list of the computers authorized to play iTunes music?

  • ' REUSE_ALV_GRID_LAYOUT_INFO_SET' problem (+)

    Hello, I'm using REUSE_ALV_GRID_LAYOUT_INFO_SET to change filter values in ALV grid, which is displayed using REUSE_ALV_GRID_DISPLAY. In spite of specifying all the values in table IT_FILTER, filter values do not change. If I try to change values man

  • Rich text versus plain text when sending to Outlook

    I've notice some strange behavior with Mail today. I've been sending some attachments to people who use Outlook on an Exchange server. When I send the mail in Rich Text Format, they receive the mail but the text and the signature are included as atta

  • Can i know the about Forte for JAVA 4

    hi all, am switching to use Forte 4 CE, does anyone know the update center web address? i wish to download the package and install it later while offline, any? thank you