private String createMnemonic(String text){
  if (text == null)   return text;
  int pos=text.indexOf('&');
  if (pos != -1) {
    char ch=text.charAt(pos + 1);
    if (ch != ' ') {
      setMnemonic(ch);
      return text.substring(0,pos) + text.substring(pos + 1);
    }
  }
  return text;
}

private String createMnemonic ( String text ) { if ( text == null ) return text ; int pos = text . indexOf ( '&' ) ; if ( pos != - 1 ) { char ch = text . charAt ( pos + 1 ) ; if ( ch != ' ' ) { setMnemonic ( ch ) ; return text . substring ( 0 , pos ) + text . substring ( pos + 1 ) ; } } return text ; }
create mnemonics of text containing " & " . based on ms notation of & help = > h is mnemonics creates alt_
