CS 106A Lecture Notes - Lecture 10: String Band, Parsing, Init

47 views4 pages

Document Summary

Lecture notes resizing window: assignment 6, you can run demo, be able to resize window immediately, made up of many classes that interact c. i. Using classes representing objects that contain data c. ii. Namesurferdatabase = responsible for reading file with all info about baby names and their ranks c. ii. 1. a. i. Namesurferentry = entry in database that has all info of one baby name. Also responsible for redisplaying info after window is resized c. ii. 1. b. iii. Use mycanvas to reseizsot: very similar to musicshop, components, container is like bag holding components a. i. Components are things that can be displayed: window can listen for things that happen to it. Add(canvas): this method creates canvas on top of program window. //implement this interface so allows for using set of methods that listens //to events. Public mycanvas(){ addcomponentlistener(this); rect = new grect(box_width, box_height); rect. setfilled(true); private void update(){ removeall(); add(rect: must have these methods even if they don"t do anything, to have canvas react to events b. i.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents