• Post Reply Bookmark Topic Watch Topic
  • New Topic

What to do to make my mnemonic work?  RSS feed

 
Andrzej Zahorski
Greenhorn
Posts: 11
IntelliJ IDE Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I set up mnemonic for my "File" JMenu, but program does not seem to register my shortcut (alt + F). Setting for the mnemonics is in the MainFrame. What causes this behavior?

 
Rob Camick
Ranch Foreman
Posts: 2822
15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is about mnemonics. Why would you post over 500 lines of code??? That is way too much!!!

Create a proper SSCCE that demonstrates your problem.

So to test mnemonics all you need is a frame with a JButton. You set the mnemonics for the button and add an ActionLilstener to the button. The whole class should be about 20 lines of code.

Once you get this simple class working then you apply the knowledge to your real application. It is much easier to debug a problem with 20 lines of code than 500.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!