Results 1 to 2 of 2
  1. #1
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default Press F1 key to open Help Contents

    Hi, I'm sure there is a simple way to do this. I have a menu, and by pressing CTRL + A, for example, it launches that menu. Here's the code:


    contents.setAccelerator(KeyStroke.getKeyStroke(Key Event.VK_A,
    ActionEvent.CTRL_MASK));


    How would I do the same thing by pressing the F1 key, and is the solution the same for all the F keys?

    Help is greatly appreciated.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. How to open a file without erasing its contents?
    By spmchugh82 in forum New To Java
    Replies: 2
    Last Post: 12-17-2008, 02:52 AM
  2. press any key to continue
    By dotnet007 in forum New To Java
    Replies: 3
    Last Post: 05-11-2008, 06:19 AM
  3. Reading Char without needing to press enter
    By x0psci in forum New To Java
    Replies: 0
    Last Post: 11-23-2007, 05:28 PM
  4. Press any key to continue/press enter
    By JT4NK3D in forum New To Java
    Replies: 1
    Last Post: 11-17-2007, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •