How do i set Shortcut key for activating some operation for JButton

while using the JButton component,one question is arising in my mind that is
(1)how to set Shortcut key instead of using JButton actionPerformed event.
I need a shortcut key for the similar operation has to be performed

http://java.sun.com/docs/books/tutorial/uiswing/components/button.html

Similar Messages

  • How to set Shortcut keys for button in Apex

    Hi
    Could anyone help me on how to set shortcut keys for buttons in Apex.
    I need to use say ALT + S to submit the page.
    The following thread pertaining to HTML DB refered to use ACCESS key. but that couldnt work in my case.
    Re: operation of the app. with the keyboard
    Any pointers on achieving this would be helpful.
    Thanks
    Vijay

    Hi Vijay,
    I’m afraid you must do it using javascript key listener. You can’t use action() on template based buttons because they are actually not HTML buttons but images with hyperlink.
    Key listener checks which key has been pressed down and invoke some JS function. For example, write this code in page header:
    <script>
    document.onkeydown=keyCheck;
    function keyCheck(e){
         var KeyId = (window.event) ? event.keyCode : e.keyCode;
         switch(KeyId){         
              case 113:
                   doSubmit('SAVE');
                   break;                    
              case 118:
                   alert('Hello');
                   break;
    </script>
    This script will submit page with request 'SAVE' if you press F2 or will show alert message if you press F7. Modify it to your issue.
    Regards,
    Przemek

  • How to create a shortcut key for email ?

    how to create a short key on mac book pro

    You do not say what OS X you are running.  If it is 10.8.3 you simply can have Mail a 4-finger swipe away.
    No short key neccessary?
    If some earlier OS X see >System Preferences>Keyboard>KeyboardShortcuts>ApplicationsShortcuts

  • Robohelp Shortcut keys for styles

    RH8 HTML
    Just wondering if theres a way to set shortcut keys for styles, similar to how you can do it in MS Word.
    Just makes formatting etc so much faster, instead of having to use the mouse and click around.
    I see I can set shortcuts to do other RH functions, like create new topics etc....but nothing for text formatting.
    Thanks, Nick.

    Hi Nick
    RoboHelp has always offered the following:
    Ctrl+Alt+1 Applies Heading 1
    Ctrl+Alt+2 Applies Heading 2
    Ctrl+Alt+3 Applies Heading 3
    Ctrl+Shift+N Applies Normal
    Aside from that, perhaps use something like Macro Express to create a macro you could use.
    http://www.macros.com
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How to set primary key for a date column

    hello experts .,
    i need to set primary key for a column consists of the datatype date. how to solve this..?

    1008318 wrote:
    its my personal need..then it is a very bad personal need. DATE is not an appropriate type to be using for a primary key, as it cannot be guaranteed to be unique, especially when inserting multiple rows at once.
    You would be better working to business needs and implementing correct technical solutions to those needs, than to just do things based on your personal needs.

  • Shortcut key for Firefox icon won't start multiple sessions

    If is set up a shortcut key for the desktop icon to start firefox, it can start one but not multiple windows/sessions of firefox. I want it to start a new firefox window, just like I can with IE, even if firefox is already running. How can I fix this?

    Dear Q,
    Many thanks for your help!
    Didn't work straight up for a couple of times.
    Firefox(3.6.8) just wouldn't start,but did allow me to uninstall it.
    Which I did, removing all personal data. (second time)
    I then installed older version (3.6) , and is up and running again.
    Once again , many thanks , for your time and effort to help.
    journeyman.

  • How do I set numbered lists for headings in Pages 5.2, and keep that system of numbered lists saved?

    I have tried to set numbered lists for headings in Pages 5.2 but have not succeeded. I have read similar questions concerning this but this has not helped me...
    When I say numbered lists I mean something extremely important and simple, for instance:
    1. Introduction
    1.1. Background
    1.2. Purpose and Questions
    2. The Legality of Clause X
    2.1. Legality under Article 101.1
    2.2. Legality under Article 101.3
    And so on...
    Heading 1. is selected as "Heading", 1.1 is selected as "Heading 2", and if I had 1.1.1 it would be selected as "Heading 3" and so on...
    I have navigated my way to the Format window, and under the tab "Style" and down to "Bullets & Lists". I have here selected the following: Numbered, Numbers, 1. 2. 3. 4., Tiered Numbers, Continue from previous.
    There are several problems with this currently.
    First, based on the example it becomes "2. Background" when it should be "1.1 Background" instead.
    Second, after writing some body text between the headings and then select a new heading, all the previously selected settings I mentioned above in "Bullets & Lists" have to be reselected.
    So, how do I set numbered lists for headings, or so called sub-headings, in Pages 5.2? And how do I keep that selected system of numbered lists saved so I don't have to retype it for every new heading I type? (e.g. so that Pages knows that every time I choose Heading 2, I want it to number the heading in the way selected)
    Obviously, manually writing the numbers for every heading is not a viable option, as it makes table of contents problematic and is simply tedious. You need an automatic way of doing it, especially if you write long documents where keeping headings in order is absolutely essential.
    Also, reverting back to previous Pages versions (like v. 9 I think?) is not an option as that does not exist on my recently purchased Macbook Pro.
    I need to be able to do this on Pages 5.2 and do it automatically.
    I appreciate any help with this.

    iWork '09 is not "outdated" it still works and works extremely well and whilst not perfect with MsWord it is far far better than Pages 5.2 which has a stream of major issues with exporting. It is also way better and faster to use than Microsoft Office.
    So what is your time and work actually worth? If it is less than $19.99 for 6 months, you may as well just chuck it in and take that job on minimum wages.
    You are assuming things for Office 2014 with absolutely no inside knowledge. Much as we assumed Pages 5 was going to be the long awaited improvement, but ended up being a downgrade to match the iOS version, Microsoft is headed the same way with their mobile versions.
    This is not like getting the "latest" pair of pants where you go with the crowd and throw out your cigarette legs which replaced the flares, which replaced your low cuts which replaced your cigarette legs, which replaced…
    This is work.
    If it does the job and does it well, use it. There is nothing out there to really match what Pages '09 does. Yet.
    LibreOffice can do most but not all, but has a UI that only a mother could love. It's great redemption is that it uses both open formats and the standard Microsoft formats and is under active development. It also opens and saves to just about everything. When they finally work out the Pages formats, I'm sure they will open those as well.
    I use a lot of professional software. Just because the publisher's marketing department says change the product so we can sell more, doesn't mean you have to pay any attention whatsoever. Adobe being a classical example. Most designers are just ignoring their latest subscription based bloatware and getting on with their work.
    Peter

  • Non numeric keyboard - I need the shortcut keys for Google Earth

    I need the shortcut keys for Google Earth - like Page Up, Page Down etc, but the new Apple wireless keyboard hasn't got the numeric keypad.
    Are there alternative shortcut keys for Page Up/Down? Or can I programme any of the Function keys to do that instead?

    You can create custom shortcuts pretty easily. Here is an article that explains how to do it:
    http://www.handpickedsoftware.com/tiger-tip-creating-custom-keyboard-shortcuts

  • How to create a shortcut menu for the pane

    Hi all
    Well - I know how to create a shortcut menu for a control, but how is it created for a pane? There is the possibility to add an event case for a shortcut menu linked to a pane (see picture), but how can I create this menu?
    Message Edited by becktho on 08-01-2006 11:32 AM
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    ScreenShot001.png ‏22 KB

    ahlers option works, sorry but I can't add images from work!
    Just use the shortcut Menu Activation filter event? to create a menu.
    Ton
    Message Edited by TonP on 08-01-2006 12:56 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_BD.png ‏4 KB
    Example_BD.png ‏4 KB

  • Disable shortcut keys for Universal Access

    At our school we have a bit of an issue with students using keyboard shortcuts to set the Universal Access options (usually to Black on White, but also Zoom and VoiceOver), which freaks out the next student using the computer. I'd like to disable the shortcut keys for those settings. Are there ARD Unix commands that would do it?

    Hello Francois,
    Thank you for your fast reply!
    I tried your recommendation, but got the following result:
    When I have a label of "& OK" with the blank symbol as ALT-255, the Button in the Alert Box still has the focus. It seems as if there now is a blank in front of the OK (which is underlined). This does not really solve my issue, because the Button still has the focus and that should not be. The best solution for the user would be if he only could accept the message with a mouse klick.
    Is there an other suggestion?
    Thank you so much!

  • How do I get license key for trial app, now that I have joined Creative Cloud ?

    how do I get license key for trial app, now that I have joined Creative Cloud ?

    after trying again, the signin process worked and activated my trial copy for me.

  • How to create a account key for application type M ?

    Hi Guys,
    How to create a account key for application type M ? and link the same with
    Gl account.
    thanks.

    Hi
    Please create the account keys or transaction keys in
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
    Thanks & Regards
    Kishore

  • How do I set a reminder for the last day of every month

    Have I missed something? But how do you set a reminder for the last day of every month to recurr indefinatley in iOS6? Sorry if this is really simple but I just can't seem to work it out. Any help gratefully received.

    Hey Mattye88 not sure if you have seen but actully you can do this, but for some reason you have to use Siri.  If you bring up Siri and say "set a reminder ever 4 weeks from next wednesday to check the gas meter" it will set one and it will work just fine, I have reminders to water a Bonsai every three days and it works fine it just shows as custom repeat on the user interface.  Alas it seems you can not use Siri to set one for the end of the month though which is why I am in this threed.  Still hope it helps you to know how to sort this problem atleast.

  • How do I find the key for my time capsule router

    How do I find the key for my time capsule router

    Hello, see if these are of any help...
    http://www.iclarified.com/entry/index.php?enid=4547
    http://manuals.info.apple.com/en/TimeCapsule_SetupGuide.pdf
    If it's the Pre-Shared Key you're looking for, open Airport Utility, under the menu item Base Station, look for Equivalent Network Password.

  • How can I set a password for firefox so that everyone have to enter the password before executing firefox

    My younger sister executed my firefox just at this afternoon(she originally use IE), and she saw something that can't be seen. How can I set a password for firefox so that everyone have to enter the password before executing firefox?

    Also see this for an English version of Profile Password:
    *Profile Password: http://nic-nac-project.de/~kaosmos/profilepassword-en.html#PPF
    It is an extension to protect the profile with a password, but being an extension that protection can easily be bypassed by starting Firefox in [[Safe mode]].<br />
    So do not rely on it.<br />
    If you want to protect content then you have to use methods supported by the OS like a separate user account with a password or an encrypted file system.

Maybe you are looking for

  • Query : In rows, can we split heading in two lines?

    Hi Friends ! I know, in columns, we can split the heading in two lines. In Rows, characteristics " Nomination Header " is there. The output should come like: Nomination Header Awaiting your inputs. Thanks Rekha

  • Adobe Photoshop CS6 Extended and Lightroom 4

    I have the boxes and discs for both of the student and teachers version. Should I bin them? Or would they be useful for upcoming versions?

  • How to use "sequence" after we add new data ?

    Dear all : Could someone tell me how to increase the number after we add new data and put the number into one field per time ? Thank you

  • Drop-down menu on link buttons

    I have designed a number of basic websites using Dreamweaver - and know how to put together a menu table consisting of a number of linked buttons that will take you to the relevant new page when you click on it. What I now want to know how to do rela

  • How do I cut a movie into numerous smaller videos?

    I have a DVD/movie in iTunes that is simply a bunch of music videos. I want to divide this one DVD/movie into the 10 separate music videos it actually is. Can someone help me with this? I couldn't find any existing topics on it. Thanks!