Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2004

Tip: Looking for answers? Try searching our database.

F1 Key for help... where to place the listener?

Thread view: 
Jack - 29 Jan 2004 01:18 GMT
Hi,

I'd like to add help to my application, and have the help system invoked
when the user pressed the F1 key on windows.

My question is, where do I attach the key listener?

I want the listener to be able to capture the key event regardless of which
component has focus.

Thanks,

Jack
Alan Moore - 29 Jan 2004 01:36 GMT
>Hi,
>
[quoted text clipped - 9 lines]
>
>Jack

The easiest way is just to tap into the EventQueue, as described in
this article:

http://www.javaspecialists.co.za/archive/Issue007.html
Adam - 30 Jan 2004 15:28 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> I want the listener to be able to capture the key event regardless of which
> component has focus.

KeyboardFocusManager.addKeyEventDispatcher | PostProcessor

Adam
Jack - 03 Feb 2004 03:13 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jack

Alan's suggestion worked based on the article... works perfectly.  I guess I
could've invoked the same via a menu item neumonic?.   Oh well... now I know
how to do the hot-key thing.

Adam, I will check out your suggestion as well.

In any case, this is sweet... it's working quite well so I thank you for
your pointers... otherwise this could have been fairly painful.

Thanks again,

Jack


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.