This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes KeyAccelerator for many panels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "KeyAccelerator for many panels" Watch "KeyAccelerator for many panels" New topic

KeyAccelerator for many panels

Joao Cunha

Joined: Jul 12, 2004
Posts: 24

I'm developing a swing application and I want to support key accelerators to my menu options. However, I'm facing some problems with it.
My application contains 5 views (JPanel instances) and the menu is on the main view. Depending on the view that is selected, the key accelerator does not work.
And even on the views that it works, if I select a tab (for exemple), the key accelerator does not work.

Is there a code that I can put on each view to guarantee the key accelerator functionality?

I agree. Here's the link:
subject: KeyAccelerator for many panels
Similar Threads
Unable to launch JNLP application
JTabel and JMenuItem accelerators
Key accelerator steals focus from textFields?
Arrow Keys not working in JMenu