Problem in assinging key strokes to JButtons

hi,
i extended JDialog class and created a modal dialog which consits of some JLables and JTextFields with two jbuttons. 1) Ok and 2) Cancel.
I would like to activate the Ok button when i just type enter key no matter where the cursor is focussed. how can i achieve this?
thanx

hi
i want to activate my JButton whenever i will click them .Atleat they will show some output like if i will click Ok button then it will give me some successful message
thanks
best regards
madhvi

Similar Messages

  • Response time to any key stroke varies 3-8 seconds..running WindowsEP on Dell, formally no problem on generic PC

    Response to any key stroke delayed 3-8 seconds, running windows XP on Dell..formally no problem on generic PC
    == This happened ==
    Every time Firefox opened
    == move in hardware..to Dell

    check if the file /opt/bobj/DI/log/Server1/dbometa__msykora/error_07_17_2009_09_14_56_23__d16337cb_3c6d_4bac_9ae0_f92ee944a47f.txt.idx exists or not ?  it does exist
    have you tried increasing the number of file descriptors ? capped at 1024
    there was a issue fixed related to same error, in 11.7.3.7
    you can try following
    Add the following in the $LINK_DIR/bin/DSConfig.txt in the AL_Engine section on the job server machine
    fileopen_retry_time=90
    First try with 90 then with 120
    =>added to DSConfig.txt but no effect
    also are you able to reproduce this error all the time or its random ? all the time
    are you running Dataflows in paralle ? yes
    if so how many DF are running in parallel ? 3

  • My G5 won't boot up. The Gray screen comes on and it thinks about it until the fan revs up like it is about to explode. A friend said to start it up with the OS disk and then go to utilities. Didin't work. Any suggestions? Isn't there a key stroke to help

    Oh, so this is where I ask my question. Sorry, first time here. As I was saying in my long intro, the gray screen come up and the thing is spinning at the bottom, but nothing happens. Then the fan starts reving up like it is about to explode and I have to manually shut it off. A friend told me to start it up with the OS disk and then go to utilities. I couldn't find the thing, so I went out and bought another. Needless to say, it didn't work. Is there a key stroke to help jump start the machine? How can I get into this thing? I would prefer not to take it in because there are a lot of things on there I don't want just anyone to have access to.Thanks, in advance, for your help!

    The last time you had to hold down cmd opt pr more than twice was a decade ago....
    G5? PowerPC? 10.5? or earlier....
    https://discussions.apple.com/community/desktop_computers/power_mac?view=discuss ions
    Apple has a number of resources like "Power or Startup Quick Assist"
    http://support.apple.com/kb/HT1149
    Your drive does need to be repaired, and best things to buy are another backup recovery drive, with a small OS X partition; a copy of Disk Warrior is expensive @ $90 but excellent and best.
    Never bother with or use the drive or reinstall while there are errors. Don't take a "clean' bill from Apple Disk Utility to mean there are no errors. Only that it didn't find what it looked for.
    http://www.macintouch.com/readerreports/harddrives/topic4557.html#d12aug2010
    http://www.alsoft.com/DiskWarrior/index.html
    A quick search "keyboard shortcuts" takes you here:
    http://support.apple.com/kb/HT1343
    how to resolve and fix startup issues with fsck and disk utility:
    http://support.apple.com/kb/TS1417
    http://macperformanceguide.com/Mac-HowToClone-backup.html
    http://macperformanceguide.com/Mac-HowToClone.html
    How to use DU to backup and restore
    http://support.apple.com/kb/HT1553
    http://www.alsoft.com/DiskWarrior/index.html
    http://www.bombich.com/ccc_features.html
    Make sure to have multiple backup sets and of your system so if there is a serious problem, you can just erase and restore to be back runninig.
    Sounds like your G5 though needs PMU reset, not PRAM, and the best way for those is to clear nvram instead. might even want to check for dust; tell what System Profile says (later) as to "PowerMacX,Y" or "MacProX,1"
    http://www.apple.com/support/powermac or /macpro
    http://www.apple.com/support/sitemap/
    The Utility menu is on the menu bar of an "OS X Install DVD" and at the point where you get to but stop at "install....' for OS X. you probably do need to install OS X on another drive to work from.
    Oh, a real severe issue and damage to the drive directory or filesystem CAN in cases prevent booting from DVD (the system still tries to find and see what boot volumes are present) and can help to pull or disconnect the drive. Putting a drive in a FW case to turn on after startup is very useful.

  • Save for Web keyboard key stroke not worky

    I'd swear I've asked or seen this discussed in these forums...but I can find no thread, even when I search for my own screen name. At any rate, I think it also happened to me back in version 6. I'm now in version 8 on a Mac.
    The symptoms are the same as the last time this happened. The "shortcut" key strokes (on the Mac) are command + shift + option + S (probably use 'alt' instead of 'option and "control' instead of 'command' on Windows?). This will usually show a brief darkening of the File menu, but nothing else happens. Until...the same keys are pressed again! Of course, mousing to the menu item works fine, but I have managed to avoid carpal tunnel syndrome and still press all four keys with one hand! Sometimes I get my cat to help...
    Since Adobe is gracious enough to provide about three dozen various pref files, it should be a breeze to start archiving them and deleting the originals. NOT! However, in my searching for the likely pref file, I have discovered that the "Adobe Save For Web 8.0 Prefs" file seems to be AWOL on my System! I have over a dozen backups of that file in Time Machine, despite the fact that they all show exactly the same Modified date, which would normally be the only reason TM would save another copy of the file. This may also indicate why the settings for the Save For Web dialog never remember the last used settings; the file thinks it is getting written to but never changes its Modified date even thought that 'state' is obviously recognized by the OS. But that's all beside the point and I digress...
    SO...does anyone remember the 'trick' for getting PSE 6/8 to remember the Save For Web keystrokes the first time they are used, instead of waiting for 'verification?'
    Thanks!

    Barbara B. wrote:
    Uh oh. You should have had an uninstaller in the PSE 8 folder in applications. I'm afraid you may have set yourself up for bigger problems by doing it this way. You may well find that you will eventually need to download and run the CS4 cleanscript to get straightened back out again.
    You may be correct, but I've had no other problems after all the different un-install methods. The only pieces that are hard to find are those that Adobe chooses to hide deep in System areas. I suppose since they were one of the first Mac developers, they think they have special capabilities to put stuff any and every where they want. As well as special dispensation to do things anti-Mac ways. I can't claim to be a power-user, but I have never, ever felt the need to purchase/use any special "uninstaller" app. And I can't think of another app I've ever owned that even needed an "uninstaller" for it. That includes Canvas, php, Apache setups, etc. Frankly, and this is simply my opinion and obviously of little importance to absolutely no one else, the way Adobe does things seems to be extremely un-organized, not-well-thought-out and downright non-Mac. The only thing even marginally close to their confusing instal/uninstall process is Stanford's Folding@home set up. It sometimes requires a few Terminal commands...
    I will perform a search for that CS4 "clearscript" thing, however. Thanks!
    Even the response I got from my Support post assured me that...
    reset/restore the Preferences, click Yes or OK . Now try to use the "Save for Web" keyboard command by pressing "Alt+Shift+Crtl+S". I am positive that after following the above steps your issue will be resolved .
    OK, I get the rest/restore step. but what does the "alt+shift+Crtl+S" have to do with anything? It certainly is not the keyboard short cut for the Mac version of Elements. Perhaps the chap didn't notice the details in my message or the hardware/software information that came with my request for help. I find it strange that somehow the language differences cause the tech's positive belief that his steps would fix the issue that he also presents:
    If the issue is still not resolved then please send us the below mentioned information so that we can provide you with the best possible resolution:-
    1. Have you recently made any changes to your computer?
    2. Are you logged in as administrator ?
    3. Does the issue persist on another system or another user account ?
    4.     Do you get any error message while pressing the combination of "Alt+Shift+Crtl+S" keys on the keyboard? if yes then send us the screen shot of the error message that you are getting
    5.     Please provide the exact system Configuration with details along with the Versions.
    Every single one of those questions was included with the initial message I sent.
    I suspect that the problem is, indeed, in my System, somewhere. I installed Elements on my wife's MBP and it operated normally, even the command+option(alt)+shift+S command. So, when I get some time this week, I'll start up in Safe mode and see if that helps. If not, I'll start removing third-party Pref Panels and apps, a few at a time. If none of that helps, I may try retrieving files from Time Machine. As a last effort, I can always do an Archive and (re)Install of Snow Leopard. I'm just not sure it's worth all the effort to get one measly short cut... The only thing I know for sure is that I will not be seeking any more help from Adobe's "tech support." Why bother, they don't/can't even read the messages their own system sends!

  • Firefox 4.0.1 is constantly freezing, having to reboot constantly, and not responding to key strokes, and very slow responses to keys strokes and to change sites

    firefox 4.0.1 is constantly freezing, having to reboot constantly, and not responding to key strokes, and very slow responses to keys strokes and to change sites. Firefox 3. (the previous incarnation of firefox) did not have such problems - this has started since "upgrading to 4.0.1 - I want to change back to the previous Firefox since this is a serious problem - need specific instructions on how to go back to the old Firefox

    Do you have multiple keyboard layouts installed?
    It is possible that you have switched the keyboard layout by accident.
    * http://support.microsoft.com/kb/258824 - How to change your keyboard layout
    Windows remembers the keyboard layout setting per application and you may have changed the keyboard layout by accident via a keyboard shortcut.
    * http://windows.microsoft.com/en-US/windows7/The-Language-bar-overview The Language bar (overview)
    * Make sure that you have the Language bar visible on the Windows Taskbar
    * You can do that via the right-click context menu of the Taskbar: Toolbars > Language Bar
    * Check the keyboard language (keyboard layout) setting for the application that has focus via the icon on the Language bar
    * You need to do that while Firefox has focus because Windows remembers the keyboard layout setting per application

  • HT4528 went to new iso 7 and now slow key strokes

    went to new iso 7 and now very slow key strokes on keyboard

    I have the iPhone 4 and I had the exact same problem.  I did like ^^This guy suggested and fixed it by going to SETTINGS>GENERAL>RESET>RESET ALL SETTINGS.  High fives!

  • Oct 22, 2013 11:58 PM downloaded 10.9  all well 'til I get desktop and can't enter my password, message of error, and it shuts down:  reboot and error reappears"your computer     restarted because of a problem. touch any key.....etc'  75-yr-old needs guid

    Oct 22, 2013 11:58 PM 
    downloaded 10.9  all well 'til I get desktop and can't enter my password, message of error, and it shuts down:  reboot and error reappears"your computer     restarted because of a problem. touch any key.....etc'  75-yr-old needs guidance.........running 10.8.5 til today................????????  Can run in safe boot, but what do i do now ???  thanks
    MacBook Pro, OS X Mountain Lion (10.8.3), Intel core i5 2.3GHz 

    Well, after some thought, I did a 'safe boot', did a disk verify and repair in Disk Utility, repaired permissions in DU and had the same problem I'd mentioned in post.
    SO, I went back in (safe boot.........that is, hold down start button, then 'shift') and went to applications and removed or uninstalled any apps that I thought might be interferring with the re-boot or, specifically, with my being unable to sign in with my p/w.........(at the first key stroke, it would crash and give the 'error' message)....I had both Webroot and Dashlane installed that I thought could interfere with password recognition (Webroot protects from viruses, et all and Dashlane is a password codifying appl.) I took out whatever else I thought might not be friendly and, guess what ?? When I signed out of 'safe' mode, and rebooted normally, it worked.........and has been working properly for 3-4 hrs now, so guess it's good-to-go..........seems like it...........hope this helps anyone with the same problem I'd had...........no need to visit "genius bar" some 55 miles from here............guess us mid-seventies guys ain't too old for learnin'...........G'Day, Mates !!

  • Downloaded 10.9  all well 'til I get desktop and can't enter my password, message of error, and it shuts down:  reboot and error reappears"your computer     restarted because of a problem. touch any key.....etc'

    downloaded 10.9  all well 'til I get desktop and can't enter my password, message of error, and it shuts down:  reboot and error reappears"your computer     restarted because of a problem. touch any key.....etc'  75-yr-old needs guidance.........thanx
    running 10.8.5 til today........................????????  Can run in safe boot, but what do i do now ???  thanks

    Well, after some thought, I did a 'safe boot', did a disk verify and repair in Disk Utility, repaired permissions in DU and had the same problem I'd mentioned in post.
    SO, I went back in (safe boot.........that is, hold down start button, then 'shift') and went to applications and removed or uninstalled any apps that I thought might be interferring with the re-boot or, specifically, with my being unable to sign in with my p/w.........(at the first key stroke, it would crash and give the 'error' message)....I had both Webroot and Dashlane installed that I thought could interfere with password recognition (Webroot protects from viruses, et all and Dashlane is a password codifying appl.) I took out whatever else I thought might not be friendly and, guess what ?? When I signed out of 'safe' mode, and rebooted normally, it worked.........and has been working properly for 3-4 hrs now, so guess it's good-to-go..........seems like it...........hope this helps anyone with the same problem I'd had...........no need to visit "genius bar" some 55 miles from here............guess us mid-seventies guys ain't too old for learnin'...........G'Day, Mates !!

  • Select a value in JComboBox by key stroke

    Hi all,
    I m trying to create a GUI with comboxes, in which users can select the value by pressing keys. e.g.
    ComboBox:
    Apple
    Boy
    Cat
    Dog
    when press 'A', it should go to "Apple", and something like this.
    In my case, the objects in the Combo box are not Strings, they are bean objects, e.g.
    public class Apple{
       private String name;
       private double weight;
       public Apple() {}
       public void setName(String name) {
          this.name = name;
       public String getName() {
          return this.name;
       public void setWeight(double weight) {
          this.weight = weight;
       public double getWeight() {
          return this.weight;
       public String toString() {
          return this.name;
    }in this Object, its 'toString' value is the value it's gona display in the ComboBox. Othger entries in combo box are likewise.
    I m not sure this is the problem or not, i just couldn't get the right value selected by key stroke.
    Anyone can help?
    Thanks!
    best regards

    Works fine for me in this example:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=613731

  • Trying to save key strokes with a for loop

    I have been trying to action script for years with no
    success. I to some time off and learned javascript and some oop
    (ruby) so I thought I would take another stab at it. I am still
    having problems. Here goes...
    I have several movieclips on the stage that will be set up as
    buttons. They all have the same effects associated with mouseover
    and mouseout so I thought I could save some key strokes with a for
    loop. But I can't get it working right. Could someone tell me what
    I am doing wrong please?
    If anyone can help it would be appreciated.

    kglad,
    Thanks for taking a look. In answer to your question. The
    movie clip instance names are mc_ItemText0 ... mc_ItemText3.
    quote:
    those declarations at the top of your for-loop aren't doing
    anything useful. what are the names of you movieclips that are
    on-stage?
    In reg\ards to the variable declarations, sorry my variable
    names are causing confusion. I use the name "mc" for two different
    variables. Once for the FOR loop and a separate time locally in the
    functions grow and shrink. The ones set for the For loop are used
    in the 'onEvents' at the bottom of the script. Sorry for the
    confusion.
    Because the code works if I take it out of the FOR loop and
    replace the
    's with the numbers that corruspond to the movie clip; I don't
    think the similar names are conflicting because of the scope. To
    make the code more readable and eliminate confusion I have posted
    the code with unique variable names.
    I have searched the forum for FOR loop difficulties and
    found several cases that seemed similar to mine, but I didn't
    understand what was happening.
    Examples:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1253110&highlight_key=y&keyword1=for%20loop
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1202338&highlight_key=y&keyword1=for%20loop
    My code with unique variable names to end confusion:

  • Can I open with a single key stroke my events?

    Can I close and open with a single key stroke my events (Film rolls). They are all open when viewing the Library Photos. I would like to be able to close them all and just see the title of each event sometimes rather than scroll all the pictures. Iphoto 08

    Bring up iPhoto's help file and search for "keyboard shortcuts".
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier versions) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. There are versions that are compatible with iPhoto 5, 6, 7 and 8 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    NOTE: The new rebuild option in iPhoto 09 (v. 8.0.2), Rebuild the iPhoto Library Database from automatic backup" makes this tip obsolete.

  • Complete iPhoto event of daughter's prom gone.  Happened during iPhone 3 synch to mac air. No mojo, no weird key strokes, just another ordinary sync.  Event gone.  Apple no resolution.

    Complete iPhoto event of daughter's prom gone.  Happened during iPhone 3 synch to mac air. No mojo, no weird key strokes, just another ordinary sync.  Event gone.  Apple no resolution.

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    were the prom pictures on the iPhone 3 to begin with?
    what fixes have you tried?
    where is your library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?
    OT

  • Soft tones accompany key strokes.

    I should probably start this out by saying I am one of the users affected by the frozen verticle pixle issue. I discovered my 8th line last night. I doubt its related, I just wanted to make it known.
    The new issue I'm having is...sometimes when I'm on a web site (I only really notice it on the web) and I sart to type something, every key I hit will be followed by a short, faint little high pitched tone. Always the same tone for the same duration no matter what button I press or for how long.
    Going along the same line, when I use the scroll wheel on my mouse (on a web page) rather that a high pitched tone its kind of a click. It reminds me of the sound an ipod makes when you use the scroll wheel, except much more quiet. Is this the begining of ANOTHER serious problem I didn't cause or something to be ignored? Any info would be appriciated.
    PowerBook G4 17"   Mac OS X (10.4.9)   (9.4.01) X SO caM

    Mickey;
    I'm attaching an VI which simulates key strokes. You might want to take a look at it and change it to match your needs.
    Regards
    Filipe Altoe
    Application Engineer
    National Instruments
    Attachments:
    simulate_keyboard.vi ‏41 KB

  • Missing first key stroke

    Hi..I seem to remember there being a firmware update on the issue of leopard ignoring the first key stroke for some reason. I have that firmware update and it says it's installed, though I still encounter this problem...anyone else?

    There have been many threads on this topic, here are a few to peruse:
    http://discussions.apple.com/thread.jspa?messageID=6578448
    http://forums.appleinsider.com/showthread.php?t=81413
    http://discussions.apple.com/thread.jspa?messageID=6522928
    I don't think there's been an overall resolution to this, however...

  • Just installed iOS 5 and my phone does not ring and i can't hear my keys stroke sounds

    just installed iOS 5 and my phone does not ring and i can't hear my keys stroke sounds is there any solution to this problem

    If KiltedTim is correct I agree with him. If the phone is not hacked try temporarily disabling your antivirus and firewall that may be blocking access to gs.apple.com. See also this article from Apple: http://support.apple.com/kb/TS3694#error3194

Maybe you are looking for