Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setMnemonic using a sting

 
Craig Parsons
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know to use the setMnemonic I type
button.setMnemonic('B');
but what if I have have an array of buttons labeled 1 thru 9. How can I use setMnemonic to give each of them a numbered hot key (1 - 9) without having to set each button individually.

Thanks,
Craig
 
Joe Ess
Bartender
Pie
Posts: 9259
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String.valueOf(sub)
Integer.toString(sub)
""+sub
[ January 30, 2004: Message edited by: Joe Ess ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic