The RectangleComponentViewer
-
creates a JFrame (line 32)
-
adds the model (a RectangleComponent) to the frame (lines 9 and 33)
-
sets the frames dimensions, etc. (line 35, 36)
-
makes the frame visible (line 37)
This view class does rely on the components it adds to the view to be able to display themselves.
The paintComponent of each component added to a JFrame executes whenever the JFrame is made visible.