


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of java's observer class and its observable interface, which are essential components of the observer design pattern used in the model-view-controller (mvc) design pattern. The relationship between observer, observable, and mvc, and provides an example of how to implement the observer pattern using java. Students will learn how to set up the code to have the controller let users click a button that sends a message to the model, which in turn notifies the observer(s) of the state change.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



implements
for each o in my_observers o.update(this)
update JPanel paintComponent update JPanel
// 3. Implement class View // 4. If time permits, Implement class ViewTwo to show the toString version // of the model's current color in a Jlabel on a JPanel // 5. What would you have to do for this second view to be swapped at runtime