CS 106A Lecture Notes - Lecture 25: Keyboard Shortcut, Mnemonic, Init

34 views2 pages

Document Summary

Announcements: assignment 7 can have late days used on it, however, the second late day only extends until sunday morning at. Recall: guis: setup differences extends program instead of graphicsprogram init instead of run add buttons to specific directions instead of entire screen addactionlisteners() instead of addmouselisteners() actionperformed instead of mouseevent/ mouseclicked. Icon: a picture that can appear inside a component, public class imageicon. Public imageicon (string filename) / (url address: then seticon. Mnemonics: mnemonic: a context-sensitive menu hotkey assigned to a specific button or other graphical component. Jtextfield: takes in any text as input, intfield and doublefield only accepts ints and doubles, jspinner has up and down buttons that increase/ decrease the value. To do something when the enter button is pressed, use textfield. setactioncommand( command string ) and textfield. addactionlistener(this) To distinguish between button clicking and text field entering, use event. getsource() method.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers