Save the color value
The
setMessageColor
method
- saves the incoming color parameter
- in a private instance variable
- named messageColor
that was added to the
SimplePicture class.
The default value of the variable is
Color.WHITE,
- thereby preserving
the default behavior of the addMessage
method.
You can view the new variable named
messageColor
in Listing 11.