CS 106A Lecture 13: CS 106A Lecture Notes Week 5 Mon

26 views2 pages

Document Summary

Object method example: glabel creates the label, setfont creates a font; setcolor creates a color for the label, the add command finally places the label on the program. Colors: existing colors in java include black, blue, red, etc, you can create your own color using red-green-blue (rgb) values of. When you draw multiple shapes that overlap with each other, the last one is drawn is on top. Graphicsprogram methods: several methods available in the graphicsprogram (see lecture slides) When changing location of shape as well as height and width of object, use * and / When changing the location of shape, the location of certain aspects need to be as a ratio of the size. Simple animation: general loop for animation, while (test) { Gcompound: sometimes it is useful to create a compound shape that represents several shapes grouped into one, call a compound and then add things to it by writing compoundname. add()

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

Related Documents