For full credit it's enough to do just the first problem.
Here are some hints on setting the text:
drawString of the Graphics package writes text.
Changing your font
To liven up your font a bit (otherwise it will appear in the default font), you can set the font for the graphics object just as you set color for drawing, only instead of
setFont() (see the Graphics contract). Changing your font
requires creating a new
Font object. The
Font constructor takes 3 parameters:
Font rainfont = new Font("Serif", Font.BOLD, 20);
The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.