GRAPHIC JAVASCRIPT

Back to index

In this activity the student will practice placing text on the applet area. The challenge will be to center lines of differing lengths. It will be a real good idea to review the previous lesson before attempting this lesson.


EXAMPLE:
This applet is an approximation of what the student will be expected to create. Check out the code and make sure all the lines are comprehensible. The student will need to experiment with the use of the drawString method to successfully complete this activity.
Your browser does not support the HTML5 canvas tag.


ASSIGNMENT:
You will create a five line adaption of what is referred to as a Haiku. Here are the basic rules for this form of a Haiku:

  1. Topic or subject of poem
  2. Three adjectives describing subject
  3. A short five to seven word line about subject
  4. A short line (shorter than previous line) about subject
  5. A single word relating to subject

Each of these lines must be horizontally centered in the applet area and the lines must be evenly spaced vertically.

Your subject can be almost anything. It could be a pet, a person, an object, a place, an idea, a favorite food, a special event, a holiday, etc.

Additionally, you will need to change the colors around so that they are totally different from what is shown in the example. However, the text must be easy to read.