CS 121 Lecture Notes - Lecture 63: Mnemonic
Document Summary
Tool tips & mnemonics: can enhance the user interface & facilitate the use of the components. Tool tip: a short line of text that will appear when the cursor is rested on top of the component (the purpose of a button): can be assigned using the settooltipnext method of a swing component, ex: Jbutton button = new jbutton( compute ); button. settooltiptext( calculates the area under the curve. ); When button is added to a container & displayed, it appears normally. When user rolls mouse pointer over button, hovering there momentarily, the tool tip text pops up. When user moves mouse pointer off of button, the tool tip text disappears. Mnemonic: a character that allows user to push a button or make a menu choice using keyboard in addition to the mouse: ex: when a mnemonic has been defined for a button, user can hold down. Alt key & press mnemonic character to activate the button.