Buttons and enter key problem

hello,
there are a few projects of enterprise quality which I am developing in java swing. I found out through research that many or rather most people involved with java believe that swing is ready for enterprise class robust desktop applications.
so I as the team leador am starting my new projects in java swing.
I personally find that the amount of java libraries present provide a rich set of functionality and it gives big mussle power to the developers.
I am only concerned about one problem which many of you might have solved.
I find that I have to hit the space bar instead of enter key to fire an action. in languages like vb I can press enter key to fire the click events. specially in menu items I certainly don't expect my clients to press the spacebar. besides there are many people who are so used to the keyboard and enter key in particular that it will be hard or rather next to impossible to change their habbits.
how can I make the menu items work with the enter key. I mean do I need to create the code for keypress events every time I also create an action performed method? or is there a way where I can do it without extra coding.
it is just that I don't want to right extra code for enter key along with click events.
one more important note.
I am a blind person and I use the access bridge technology of java.
so when I am involved in coding, I use the same.
so may be my problem isn't a problem in the first place.
kindly provide me some help
thanks
Krishnakant.

The enter-key works on menu-items in all my applications. It did so since I started with java few years ago.
Maybe some other problem (OS-specific) ?

Similar Messages

  • Hello, my backspace and enter keys suddenly stopped working. I have done a PRAM reset and used the keyboard viewer to see if the buttons work and they don't.  The PRAM reset didn't work  either

    Dear All,  the backspace and enter keys on my wireless keyboard suddenly stopped working.  Im using OS 10.7.5 and have tried a PRAM reset which didn't work.  I also used the keyboard viewer to see if the keys worked on that but they don't.  This is driving me mad, can anyone please tell me what to do?  It happened just after an update but this could be a coincidence.  Thank you for your time 

    For my computers, though some of them support BlueTooth devices and accessories,
    my preference and economy of standard, is to have wired USB and also use powered
    USB hubs for accessories.
    I've used USB wired keyboards and mouse products; and some I've bought from the
    original owners who had upgraded to BT, and never used the new Apple USB model;
    so I have spares of these on-hand since they seldom fail, but do work when BT won't.
    {A SMC reset should not cause a problem, or seldom has; but can solve some.}
    In my opinion, the wired USB keyboard is an essential accessory, if not a necessary
    primary means of user access on a continuous basis. At least until the wires fail...!

  • I need to reprogram the delete and enter key to the left side of a external keyboard for the ipad mini. don't need the caps/lock or ctrl key and due to an injury my daughter can only use her left hand to type. She is using a text to speech app to verbaliz

    I need to reprogram the delete and enter key to the left side of a external keyboard for the ipad mini. I don't need the caps/lock or ctrl key. Due to a brain injury my daughter can only use her left hand to type. She also uses a text to speech app to verbalize all of her needs since her speech isn't intelligible any longer either. And her vision was significantly affected also, so the keyboard has to be mounted about 6 inches from her face. So to reach across the keyboard with her left hand to the right side delete and enter button is physically difficult and causes typing errors, which cause people to not understand what shes trying to say.
    The best keyboard so far is the Zagg folio mini. I just had to make stickers to enlarge the letters on the key buttons.
    Does anyone know how I can reprogram these two keys? Or where I can buy a wireless mini keyboard for Ipad made for lefthanders with these two functions on the left side. I have searched for days and days. It's sooooo important to me that she be able to contribute her voice again. Imagine if you got in a car accident and couldn't speak clearly any longer, but understood everything still. Thanks for any help and suggestions you all take the time to share with me. I really appreciate the kindness of strangers to help me help my daughter.
    Sami's mom

    Sami\'s mom wrote:
    I need to reprogram the delete and enter key to the left side of a external keyboard for the ipad mini.
    You cannot.

  • 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>

  • Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  the button did not work and i looked online and saw where you could change it to a regular button and enter the email for it to go.  it worked, but only for thos

    Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  the button did not work and i looked online and saw where you could change it to a regular button and enter the email for it to go.  it worked, but only for those with adobe pro.  i could not get it to work with reader.  is there a way i can make it work for reader?

    Noted.
    The LiveCycle user to user forum is across town at:
    Adobe LiveCycle 
    Be well...

  • Hp pavilion dv6 backspace and enter keys are not responding

    In my hp pavilion dv6 2158ee system  backspace and enter keys are not responding.

    Hello pvz,
    Please take a look at this document and let me know if the troubleshooting steps help resolve your issue of certain keys not functioning correctly.
    Good luck!
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • My power button doesnt work, jammed. How can i reset my phone if i cant use power button and home key to reset?

    my power button doesnt work, jammed. How can i reset my phone if i cant use power button and home key to reset?

    snystrom wrote:
    my power button doesnt work, jammed.
    Is this an iPhone 5?
    If so, see this -> iPhone 5 Sleep/Wake Button Replacement Program

  • My power button and volume keys dont work!!!!!

    HELP!!!!!
    My power button and volume keys don't work so I can't restart my iPod touch 4g and whenever I try to reboot it a voice control thing comes up

    Make an appointment at the genius bar or call Apple to arrange for repair/replace.

  • Logout button and Page submission problem

    {color:#000080}Hi All,
    We have logout buttons on every page of our application. The problem is that if the user clicks on any part of the page, even on the group-panel, the logout button gets the focus and a hit on the enter key causes the user to log-out.
    I want that the logout button, should not get any focus unless and until it is clicked by the user to logout.
    Any help will be highly appreciated.
    Thanks,
    Sheen
    {color}

    Here is what I do.
    Create a page fragment that contains the logout link/button.
    I use this in a menu panel page fragment or a header panel page fragment.
    That way, you can just add the page fragment and don't have to duplicate code on every page.
    The only thing you have to do is make sure the navigation is set up properly.
    For example. I create a menu page fragment with buttons that go to each page of my application.
    The menu page fragment has all the logic to return the proper navigation string.
    The page fragment is incorporated into the page.
    You have to set up the navigation rules for each page, but do not have to include the button logic since it is included with the page fragment.
    This also isolates you from the problem where a return activates the logout button.
    As an aside, you might want to trap the return keypress and direct it where you want or toss it.

  • Why does firefox change fonts when I am trying to download or get help, click and enter keys are disabled why?

    I recently did a clean install of windows7 after returning from Europe and installed Mozilla firefox being fed up with microsoft and google .
    Fire fox seemed to be working ok but 7 out of 10 downloads were failing, and it seemed that every ebsite entered in the address bar turned into a question.
    There was no save shortcut, or paste buttons just a set of to me useless buttons first html, last html, then when I tried to contact help all of a sudden I got a "install fonts" notice and the enter key stopped working,
    and any action key was also disabled without advising me.
    It appears that either Mozilla or someone doesn't want me using firefox.
    I also noticed that the clean disk and other utilities didn't work and that the temp and temp internet folders were empty when I tried to open them but they actually had some 25 megabytes in them when queried as administrator. I also noticed a quick flash reference to Jscript=void,
    and my 32 bit computer suddenly started up as a 64 bit Turion.
    scan and system clean said machine was clean.
    Whats going on here?
    I am not on my machine, I can't contact you on it because the enter button has been disabled by font change.
    Maybe this robot needs some help too!

    Can you undo the system restore?
    Note that using System Restore can cause your Firefox installation to get corrupted because not all files are restored (only files in a white-list), so be cautious with using System Restore.
    *You may lose data in the Firefox profile folder like .js and .ini files pr profiles.ini can be affected.
    *You may need to (re)install software that was affected.
    In case you need to reinstall Firefox then you need to delete the Firefox program folder before reinstalling to make sure that all files get replaced.
    A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls

  • Lenovo Z500 Intel Graphics and Function Keys problem on Windows 10

    Hi.i have a problem with Windows 10 upgrade.My Model Is Lenovo Z500.  6Gb Ram.  Intel 3230m.  Nvidia GT740m.Since the upgrade to Windows 10 the brightness is at full and i cant dim it,it's always the same.and there are two more problems.second one is my shortcut function keys(Fn + F buttons) don't work :bluetooth,touchpad,turn off screen,refresh etc... .Only buttons that work are for volume and for brightness that dont do anything when i try to lower it down but it shows in upper left corner that the keys are responding.And the third problem is i cant duplicate my display but only can extend .As far for the other stuff everything is smooth and fast.even my games got bigger FPS, for example "Counter Strike Global Offensive". I would like to know if there is fix for brightness and for duplicate screen problem regarding graphics driver, and for my function keys regarding keyboard. Thanks and  i hope for quick response. I know Windows 10 just came out and i know you are at full capacitity for solving everyone's problem but i hope you'll look into this because i'm not the only one with this problems.      

    Hi phitbull,
    Are all the hotkeys on your SL500 not working, or they are simply not displaying the controls on-screen? (ie. increase, decrease or mute will display on screen). It may be possible that you are missing out on some drivers for your system. If you look around the forums, there are many posts on users experiencing hotkey issues, mainly due to missing pre-requisite drivers. You can find a handful of drivers in the Lenovo Support website's Windows 7 BETA page at the following URL:
    http://www-307.ibm.com/pc/support/site.wss/documen​t.do?lndocid=WIN7-BETA
    Perhaps you can give this a try:
    1. Install the Lenovo System Interface Driver (v1.01):
    http://www-307.ibm.com/pc/support/site.wss/documen​t.do?lndocid=WIN7-BETA#sid
    2. Install the Hotkey drivers (which installs OnScreen Display v5.32.00 and ThinkPad FulLScreen Magnifier v2.07)
    http://www-307.ibm.com/pc/support/site.wss/documen​t.do?lndocid=WIN7-BETA#atkh
    Hope the above helps with your issues.
    Lenovo ThinkPad Lover using R60, T60, T61, X61s, T410

  • How to activate a button with Enter key?

    Hi
    I was certain that in AC3 this is done by default, when the button is in focus and the ENTER key is press, it dispatches a Click event.. but it doesn´t work, am I missing something?? Thanks for your help.
    myButon.addEventListener("click", funClick);
    function funClick(evtObj:Event):void {
    trace("yes");

    if you have btnNum buttons with names btn1, btn2,... and they each have a listener function f1(), f2(), ...  you can use the following to code for them all and the enter key:
    var btnNum:uint=2;
    for(var i:uint=1;i<=btnNum;i++){
        this["btn"+i].addEventListener("click", this["f"+i]);
        this["btn"+i].addEventListener(MouseEvent.MOUSE_OVER,overF);
        this["btn"+i].addEventListener(MouseEvent.MOUSE_OUT,outF);
    stage.addEventListener(KeyboardEvent.KEY_DOWN,f);
    function overF(e:MouseEvent){
        stage.focus = InteractiveObject(e.currentTarget);
    function outF(e:MouseEvent){
        stage.focus = null;
    function f(evtObj:KeyboardEvent):void {
        if(KeyboardEvent(evtObj).keyCode==13 && stage.focus != null){
            stage.focus.dispatchEvent(new Event("click"));
    // define your f1(), f2() etc functions

  • Outlook 2011 and Enter keys on external keyboard

    I'm currently running Snow Leopard on my MacBook Pro.  I connect a USB external keyboard and monitor and run in clamshell mode (laptop closed).  Using Outlook 2011, I have noticed that the Enter keys (one near the alpha keys and one in Numpad) behave differently.  For example, when typing an email, if I press the Enter key near the alpha keys, the cursor moves to a new line (behaves as expected). Pressing the Enter key on Numpad, the email gets sent (behaves unexpectedly).
    Another example: when typing an appointment (or meeting request), pressing the Enter key near the alpha keys results in the cursor moving to a new line (behaves as expected).  Pressing the Enter key on Numpad results in the appointment saving and closing (behaves oddly).
    I don't see any way of changing this behavior within Outlook 2011, nor do I see how to change this from within System Preferences.  Any suggestions?
    One last curiousity for this issue: not all people seem to experience the same thing. I have spoken with three other individuals running the same setup (and hardware).  One person's Enter keys both behave as expected (new line), one person's Enter key behaves similar to mine, and one person's Enter keys behave differently (Enter keys behave as expected in email, but oddly in appointments).

    Yes, the built in keyboard works perfectly well, both with the external keyboard connected and disconnected. I'm hoping the external one isn't beyond help... it's such a pain to have to replace!

  • Backspace and enter keys are not working

    I have a Pavilion DM4 1200 CTO lapotop running on Win 7, 64 bit OS. Suddenly I see backspace, Enter, slash,up and down keys have become dead. Tried reinstalling keyboard drivers and  BIOS update, but no luck. Any help will be appreciated.

    I have a Pavilion DM4 1200 CTO lapotop running on Win 7, 64 bit OS. Suddenly I see backspace, Enter, slash,up and down keys have become dead. Tried reinstalling keyboard drivers and  BIOS update, but no luck. Any help will be appreciated.

  • Enter Key Problems

    So last night I install the latest security update, I restart the computer and then go to sleep. This morning I wake up, turn on my MBP and my Enter key doesn't work. I popped off the key to make sure nothing is obviously wrong, everything physically appears fine. I have no idea what would cause this, I'm stumped.

    I also just discovered that neither of my shift keys work now.

Maybe you are looking for

  • Trailing block elements must have an id attribute

    hi- i'm getting the above error message when i'm running a dynamic client proxy and trying to use the jaxrpc with attachments to send a file. i've took the "AttachmentsSample" code where it uploads an image and modified it to upload a textfile instea

  • File content conversion - sender adapter for Header and detail records

    Hi Experts,                  I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes f

  • How to get rid of full screens that won't go away.

    I was using my MacBook Pro with my tv through HDMI. I made a window full screen on my tv ( I was using Blender 3D software and the window on the tv was the same application I had on my screen). When I unplugged the HDMI the full screen window on my t

  • Popup reuse and instantiate data within the popup

    Hi, I'm trying to implement a popup I can use to edit values via a form. I only pass an ID to the popup. The popup will contact a datasource to load the data from a database, based on the ID, and pre-fill the form. If no ID is passed (or empty), the

  • [SOLVED] Rosgarden package not working

    Hi everybody, it's my first post here, so I hope I get all things done. I installed the new version of Rosegarden (10.02; i686 architecture) for the first time yesterday evening. I wanted to check out its features. Rosegarden's package information: h