• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

buttons, mnemonics, dialogs and frames

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

the Java Look and Feel design guidelines state that the default command button of a top level container (JFrame, JDialog) and also the cancel/exit button should not have keyboard mnemonics.
Suppose you have a File|Exit menu item and an Exit command button.
I setup an Action (extends from AbstractAction) for both the menu item and the exit button. I also setup a mnemonic for the Action by using the method putValue(MNEMONIC_KEY, KeyEvent.VK_X).
The problem is that now both the menu item and the exit command button have a mnemonic, while according to the L&F guidelines the exit button shouldn't !
How do you suggest to solve this dilemma ?

Regards, Ronald.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic