0

Say I have a JMenuItem who's name is "This is a Test". If I want to set it's mnemonic to 'T', it automatically underlines the first T in "This". Can I change this, so it underlines the T in "Test" instead?

MCMastery
  • 3,099
  • 2
  • 20
  • 43

1 Answers1

1

Simply call setDisplayedMnemonicIndex(int index) on your JMenuItem or on any object of a class derived from AbstractButton. See the API listing for this.

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373