What am i doing wrong setting up CTRL-F  action

i want my jtextarea to getfocus when ctrl-f is pressed. what is wrong?
          KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK);
        findTxtArea.getInputMap().put(keystroke, "f");
          findTxtArea.getActionMap().put("f", new AbstractAction() {
               public void actionPerformed(ActionEvent e) {
                    ((JTextArea)e.getSource()).requestFocus();               
          });

only when i click in the textarea once or any other
textarea in the panel then CTRL-F works. first time
swing loads up it doesnt pick up the keystroke.......That's probably because you're using getSource() when you should be using an explicit reference to the desired JTextArea:    KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK);
    findTxtArea.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(keystroke, "f");
    findTxtArea.getActionMap().put("f", new AbstractAction() {
      public void actionPerformed(ActionEvent e) {
        // findTxtArea needs to be final
        findTxtArea.requestFocus();     
    });In case you're interested, here's an easier way:  findTxtArea.setFocusAccelerator('f');Only thing is, that binds the action to ALT-F, not CTRL-F; it only lets you designate the character, not the modifier key.
@Torgil, you had it right the first time.

Similar Messages

  • Help....I am trying to set up iClould on my pc....the set up was complete....when I try to sign in to set up it says the Apple ID is valid but is not an iCloud account.  Please help me and tell me what I am doing wrong.

    Help....I am trying to set up iClould on my pc....the set up was complete....when I try to sign in to set up it says the Apple ID is valid but is not an iCloud account.  Please help me and tell me what I am doing wrong. Thx

    Hi DesCoop,
    You must initiallly activate iCloud from an IOS device or a Mac. You cannot inititally activated from a PC.
    Sorry.
    GB

  • I have set up a second iTunes user account on my PC, but when I create the new iTunes account it copies the music, videos etc from the original account and they seem to be linked.  What am I doing wrong?

    I have set up a second iTunes user account on my PC, but when I create the new iTunes account it copies the music, videos etc from the original account and they seem to be linked, so that when I delete a song from one library it deletes from the other one. 
    On the online tutorials I've seen it shows that when you create a new iTunes library it should open as a blank account, but that isn't happening.
    What am I doing wrong?

    If you  have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    If necessary:
    iOS: Device not recognized in iTunes for Windows
    or
    iOS: Device not recognized in iTunes for Mac OS X

  • I am so confused.  I just downloaded Itunes.  I set up an Apple ID with a password.  Now I want to purchase a song.  I can't do it.  I keep getting the message: This Apple ID has not yet been used with the Itunes Store.  What am I doing wrong?

    I am so confused.  I just downloaded Itunes.  I set up an Apple ID with a password.  Now I want to buy a song.  I can't do it.  I keep getting the message: "This Apple ID has not yet been used with the Itunes Store.  What am I doing wrong?

    You haven't opened an account with that Apple ID in iTunes. Open iTunes and log in. A dialog will appear in which you need to enter your Apple ID and/or password. Below it you should see a link for creating a new account. Click on that link to get started.

  • Not able to change slide duration. It's set to 4.0; I change it to 3.0 and it changes to 6.5 or something. What am I doing wrong?

    I can't seem to change the slide duration in iMovie. It's set to 4.0 automatically. I change it to 3.0. The program resets it to 6.5 or something I never intended. What am I doing wrong?

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Why are my emails not deleting from all devices when deleted from one?  I have iCloud set up and turned on. I have ipad2, iphone5 and a Mac. What am I doing wrong?  Thank you

    Why are my emails not deleting from all devices when deleted from one?  I have iCloud mail set up and turned on. I have ipad2, iPhone 5 and a Mac desktop. What am I doing wrong?  Thank you.

    It depends on the type of email account you are using, not on iCloud.  If you are using an IMAP or exchange account, when you delete from one device, it is deleted from all devices.  If you are using a POP (POP3) account, it won't.  (iCloud email, Gmail and Yahoo are all IMAP accounts.)

  • I must have a setting wrong on PSE 10.  When I use selection tool and select color, it is always blue.  What am I doing wrong?

    I must have a setting wrong on PSE 10.  When I want to fill a selection with color, I choose the color but it always comes up blue.  What am I doing wrong?

    What IP address does the TC have and what IP does the computer have?
    We need more info as we really have no idea what your network looks like.
    Modem router, model, type of broadband?
    TC setup as bridge or router?
    Is the computer getting internet via the TC?
    Are you using wireless or ethernet?
    Have you set IPv6 correctly to local link in the computer on whichever network client is doing the connection?
    Did this work the first time for backup and has now failed? If so simply reboot the TC. It is a constant bug that the TC is lost to the network.

  • I am trying to print redplum coupons and I can't, help.  I have updated java, adobe flash, and made sure my printer was set on default.  I am not sure what I am doing wrong.  I have contacted redplum and no one will help.

    I am trying to print redplum coupons and I can't, help.  I have updated java, adobe flash, and made sure my printer was set on default.  I am not sure what I am doing wrong.  I have contacted redplum and no one will help.

    No Apple response???  Redplum/Valassis will not help either.  I searched, using the cups error message and though it is Unbuntu, same error so maybe useful...only problem: details would not display unless I join Unbuntu forum.  What a pain to do anything with my Mac or find any help.  I honestly regret buying this buggy OS.
    Anyway, here is what I found, FYI:
    http://ubuntuforums.org/showthread.php?t=483415
    As the old saying goes: when in doubt, consult the manual. The problem appears to be that I added the printer using the KDE Add Printer Wizard. It was automatically given a "socket" URI instead of an "lpd" one. When I:
    - altered the printer settings at http://localhost:631 (the CUPS admin page) as instructed in the manual for the printer, and
    - copied the PPD file into a second place on the hard drive (as instructed on ubunutuforums, see the link above)
    ..everything started working.
    It's still slower than windows, but I can live with that
    Probably a simple fix. Change the socket I.P. to match the printer I.P. like this:
    socket://192.168.1.86:9100. The thing I'm concerned with using socket:// is that AFAIK the printer I.P. must not change. In my case I'm able to assign a static I.P. address to the printer but it's something to consider.
    I found that the only thing I needed to do was change socket to lpd (and remove :9100 off the end as well). See Solving Ubuntu printer “broken pipe” problem (DocuPrint C525A) . BTW thanks for steering me in the right direction - very grateful.      
    Solving Ubuntu printer “broken pipe” problem (DocuPrint C525A)
    Posted on November 25, 2008
    Are you having a problem with your printer under the latest versions of Ubuntu (perhaps it worked under an older version)? Are you able to print short documents, but not longer, or more graphics-intensive, documents? (e.g. the unfortunate people at http://ubuntuforums.org/showthread.php?t=625493). Do they sit there as Processing for ages and then switch to Held? If you have the same problem I had the solution I tried may work for you too. Firstly, check your cups error log:
    sudo gedit /var/log/cups/error_log
    If you see anything like the following, the solution may be simple:
    [Job 201] Unable to write print data: Broken pipe
    PID 13359 (/usr/lib/cups/backend/socket) stopped with status 1!
    System > Administration > Printing and right click on your printer, selecting Properties. Settings > Device URI
    If you see something like socket://your_printer_ip_address:9100 just change socket to lpd and remove the :9100 off the end. Then click on apply.
    Apparently lpd is a more modern protocol which works with most printers whereas socket is more raw (and potentially faster but riskier in a network situation). Somewhere along the line, the default Ubuntu/Gnome setup for networked printers shifted from lpd to socket. Some primitive printers will have benefited whereas a larger number of more modern printers will have suffered.
    Please correct me if I am wrong (which is highly possible) but the underlying problem could be that socket may make the printer wait a long time for a large file to be processed ready for printing. Some printers, such as the Fuji Xerox DocuPrint C525A, may drop the socket if things take too long to start coming through.
    Changing timeout settings might work but lpd is better than socket so it is the preferred solution in any case.
    If this works for you, please leave a comment to let others know (ideally with a description of the printer and Ubuntu version). Printer may be relevant if it doesn’t support the direct stream protocol properly. NB I may take a while to let your comment through because of the volume of spam. Sorry about that.
    Finally, thanks to sphilli8 for the steer in the right direction at http://ubuntuforums.org/showthread.php?p=6245626.
          http://ubuntuforums.org/showthread.php?t=483415

  • I have set hyperlinks within my ibook author document, they work perfectly until i export and view on the ipad, when only one or none work, (hyperlinks to website not working at all) what am i doing wrong?

    I have set hyperlinks within my ibook author document, they work perfectly until i export and view on the ipad, when only one or none work, (hyperlinks to website not working at all) what am i doing wrong?

    An external hyperlink should handoff to Safari and leave iBooks.
    If that's not happening, perhaps there is something misconfigured on your iPad? Have you manually confirmed those links work in Safari on your iPad?

  • I bught a new Time Capsule 2Tb. I connected it to my internet router. I manege to set it up as base station but when i try to use it with time machine I always get the message "Check your IP addres"? What am I doing wrong? On my computer I have OSX 10.7.5

    I bought a new Time Capsule 2Tb. I connected it to my internet router. I manage to set it up as base station but when i try to use it with time machine I always get the message "Check your IP addres"? What am I doing wrong? On my computer I have OSX 10.7.5

    What IP address does the TC have and what IP does the computer have?
    We need more info as we really have no idea what your network looks like.
    Modem router, model, type of broadband?
    TC setup as bridge or router?
    Is the computer getting internet via the TC?
    Are you using wireless or ethernet?
    Have you set IPv6 correctly to local link in the computer on whichever network client is doing the connection?
    Did this work the first time for backup and has now failed? If so simply reboot the TC. It is a constant bug that the TC is lost to the network.

  • I have been trying to download photos. It keeps saying can't create file, please check permissions on destination folder. Ihave made sure I have set the permissions on read and write. What am I doing wrong?

    I have been trying to download photos too my MAC. It keeps saying can't create file, please check permissions on destination folder. Ihave made sure I have set the permissions on read and write. What am I doing wrong?

    Lanakivee
    Try this it worked for me Pat Willener gave it to me off the site :
    I have not read all you wrote, so I may have missed some points. As I understand it, you installed FP 10 on IE7, but it won't play any Flash content?
    Try this
    download the FP uninstaller from http://www.adobe.com/go/tn_14157
    close all browser windows, then run the uninstaller
    download the offline ActivX installer for Internet Explorer from http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe
    close all browser windows, then run the installer

  • I can' set up my e-mail accounts on my new 5-S??? What am I doing wrong??

    I can' set up my e-mail accounts on my new 5-S??? What am I doing wrong??

    Very vague question with no details.

  • I do all the steps to set wirelessly my TC but when i do my network can't find it. i don't have a modem near by but i have good signal to the mac. what am i doing wrong?

    i do all the steps to set wirelessly my TC but when i do my network can't find it. i don't have a modem near by but i have good signal to the mac. what am i doing wrong?

    Since you mention that the "modem" (which I'm guessing is a wireless router) is not close to the Time Capsule, I'm guessing a second time when I ask if  you are trying to configure the Time Capsule to "join" your network using wireless only.
    Is that correct?

  • Everything I own (iPad, iPhone, mac) is set up on wi-fi.  when i bring my work computer home (dell laptop), I cannot get it to keep the connection in a different room. All my other devices work.... does anybody know what i am doing wrong? please help!

    Everything I own (iPad, iPhone, mac) is set up on wi-fi.  when i bring my work computer home (dell laptop), I cannot get it to keep the connection in a different room. All my other devices work.... does anybody know what i am doing wrong? please help!

    Windows drivers for Intel wireless cards are known problematic.. If you have plenty of signal and it still cannot keep or hold the connection the issue can simply be the type of wireless.
    Another problem is using names that windows does not easily handle.
    eg If you set the TC using apple names, like
    Fred Blog's Airport Time Capsule wireless24ad12
    Then to windows this is too long.. it has spaces and it has illegal character.
    Change all names on the TC to suit windows. Short, no spaces and pure alphanumeric.
    Also security must be suitable.. I have no idea how old or what OS your dell is, but if you still have issues.. pull off the security on the TC for a test.. if the computer suddenly works, it is not compatible with WPA2 AES. Make sure you also use a password that is mix upper and lower case plus numbers.. avoid special characters and make it 10-20 characters long say.. it is not required to be more than that unless you are paranoid.

  • I have set up a 'group' in my contacts.  When I go to send an email to this 'group', I get an error message saying 'Invalid Address'. What am I doing wrong?

    I have set up a 'group' in my contacts.  When I go to send an email to this 'group', I get an error message saying 'Invalid Address'. What am I doing wrong?

    I have this problem too. I've always sent messages successfully via bcc to a group using a group email list in contacts. Now ... all of a sudden when I select the same group for bcc nothing happens! Cannot email my group now. Why not?

Maybe you are looking for

  • How do I connect my macbook pro to my tv?

    how do I connect my macbook pro to my tv?

  • Baffling Problem with Acrobat Javascript

    I'm hoping someone can help me. I've tried for hours and hours to find what the trouble is but just can't find a solution. The following code works, however, this is the baffling part. I need to edit / update the code but the problem occurs when I ma

  • How can we help Arch?

    Hello everybody. Often, people do want to help. Just they often dont know where to start off, making packages, helping on the tool development with patches, writing documentation, translating or similar things. How about a little guideline, how a use

  • WebAS J2EE server beind proxy

    Hi Since my WebAS J2EE server is behind a proxy, any application from within the server is not able to connect to the internet for ex: webdynpro application is not able to collect data from a webservice. I've gone through previous posts but were not

  • Could not write value ManageLLRouting

    I encountered the error "could not write value ManageLLRouting to key \SYSTEM\CurrentControlSet\Services\Bonjour Service\Parameters. Verify that you have sufficient access to that key, or contact your support personnel.". I am already the adminstrato