Originally posted by Karthick Dharani Vidhya:
I have a swing application. The look and feel for that application is WINDOWS LOOK AND FEEL. I have a JButton in it. When i try to set the mnemonic for that button, I am not getting the '-' icon below that particular letter in the button Name.
JButton button = new JButton("OK");
button.setMnemonic('O');
Same code works if i just change the look and feel to defalt java look and feel.
I don't pay attention to windows operating system all that often, but I just opened the winXP control panels and looked at all the buttons. None of them had any letters underlined. Do you see any native windows buttons with underlined letters? If not I would guess the windows LnF is simply emulating the native windows operating system in this regard.
[ April 17, 2008: Message edited by: Brian Cole ]