• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting Mnemonics

 
Mark O' Sullivan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could someone let me know where mnemonics are required to be set for this project? My server and main application window have a menu bar but client or standalone doesn't. If I don't have a menu bar, are I still required to set mnemonics for the buttons? I currently have set some mnemonics, but can't get the underline appearing underneath the letter in Windows XP. Is this required to be set pro grammatically as it can be done manually?
Thanks.
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

I have set mnemonics for all menu(-items) and buttons. It's not required, because wasn't a "must" requirement, so it's completely up to you. This code:

and then pressing the Alt-key results in underlining the F in File.

Kind regards,
Roel
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used a utility class for most of my swing functions that added listeners and mnemonic and labels....

static methods like addLabelledMnemonicButton (JButton buttonToBeAdded, JLabel labelForButton, Component componentToBeUsed) were one of my design features I felt most proud of.
 
Mark O' Sullivan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers,
thanks very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic