I have a JButton
that is constructed using an Action and this action has a name that is contains html.
I then go about setting the mnemonic on the JButton
by first parsing out html to get the first character in the name.
For example, the JButton
name might be "<html>Test<br>Button</html>"
, so after parsing the html the mnemonic key should be "T".
So now when the JButton
is rendered I can push alt-T to activate the button, however the underline mnemonic indicator on the T is not present.
Would anyone know a way to get this to occur?
Me" and "Push
Me". In which case one of them will have a differnt mnemonic set for it, and I would prefer not to couple the underlining to the html. – Denis Sadowski Jan 24 '10 at 17:18
Button"); b1.setMnemonic(KeyEvent.VK_P); That the P will not be underlined. – Denis Sadowski Jan 25 '10 at 19:37