7. Paint Sun
- Modify the applet so that it paints a square, instead of a disk (sun)
on the applet window, on a white background.
- Hint: the method for drawing a filled rectangle is fillRect, and you
can learn about other such objects worth drawing on the canvas from the on-line
- Choose some other interesting shape from the
list of methods that can be applied to a Graphics object, and draw it on the canvas.
- Extend this applet with the functionality of some of the previous applets (buttons and text).
More precisely: add a button. When the button is clicked, the "sun" changes colors (from a collection
of, say, 3 colors), and some text describing what happened (e.g. "Red sun") is drawn on the screen.