File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes hotkeys in applets using awt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "hotkeys in applets using awt" Watch "hotkeys in applets using awt" New topic

hotkeys in applets using awt

Saira Murty

Joined: Oct 07, 2002
Posts: 13
I want to create a menu with hotkeys in applet using AWT only.
I have 2 frames , the top frame contains the applet(menu).I have used PopupMenu passing MenuShortcut in the conmstructor/calling the setShortcut method of MenuItem. Tho' it displays the short cut key in the PopupMenu( ctrl-C) but does nothing when the shortcut key is pressed.
I have added ActionListener to the MenuItem and it responds to mouseClicks properly.The problem is with the shortcut keys only.I want to use AWT only.
Please give me a viable solution preferably with example
The code is as folls.

(Edited by Cindy to format code)
[ October 08, 2002: Message edited by: Cindy Glass ]
I agree. Here's the link:
subject: hotkeys in applets using awt
It's not a secret anymore!