Results 1 to 5 of 5
- 04-10-2009, 08:53 PM #1
Simplified explanation of Mnemonic
I have this piece of code, it works. However I do not understand it, it works but I need to understand it.
Could somebody give me a fairly simple explanation.
jRmetric.setMnemonic(KeyEvent.VK_B); // resets metric as default jRmetric.setActionCommand(metric); jRmetric.setSelected(true); optPane1.showMessageDialog(this,"Measurements have been reset to metric \n" + "enter your height in Cm's and your weight in Kg's", "Re-set to metric",optPane1.ERROR_MESSAGE);
- 04-10-2009, 09:00 PM #2Senior Member
- Join Date
- Sep 2008
- Rep Power
mnemonic is like when you press alt f and get to the file menu. or alt h to get to help. basically that underlined letter on menus, buttons, etc. i think...
- 04-10-2009, 09:11 PM #4
I have gone through it but I need plain english so that I understand each line of code, in the tutorials they do not explain it in a simplified way.
This is the first time I have come accross this code and put it together without understanding it.
I want to comment each line of code.
Thanks for the information though but I hope someone will just give me a simple explanation.
- 04-10-2009, 09:56 PM #5
Ever thought of reading the API for the method? I don't think it gets any plainer than that.
... The mnemonic is the key which when combined with the look and feel's mouseless modifier (usually Alt) will activate this button if focus is contained somewhere within this button's ancestor window. ...
- By hawaiifiver in forum New To JavaReplies: 4Last Post: 03-10-2009, 02:28 AM
- By Java Tip in forum javax.swingReplies: 0Last Post: 06-27-2008, 07:45 PM
- By mcal in forum New To JavaReplies: 1Last Post: 02-05-2008, 06:50 PM
- By cew27 in forum New To JavaReplies: 7Last Post: 12-13-2007, 11:39 PM
- By Eric in forum New To JavaReplies: 2Last Post: 07-02-2007, 05:37 AM