Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

What to do to make my mnemonic work?  RSS feed

 
Greenhorn
Posts: 23
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?

 
Rancher
Posts: 2974
20
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!