ASSIGNMENT:

You will create an applet which looks like this:

Here's where you get to reuse your letters from assignments earlier in this module! You will use the letters you created in LOGO to write the word ANT on a web page. If you saved your work (as suggested) then you won't have to create anything new, otherwise you will have to go back and recreate those letters (like they appeared in the ZINC and the RAT assignment).

You must use the PARAM tag to load within the APPLET tag.

Also you must use the table tag to create a three column table which includes the following column headings: METHOD NAME, METHOD DESCRIPTION, and EXAMPLE. Include the following methods in your table:

  1. drawString(String, int, int);
  2. drawOval(int, int, int, int);
  3. drawRect(int, int, int, int);
  4. drawLine(int, int, int, int);
  5. fillRect(int, int, int, int);

Finally, these three items (ANT in LOGO, the Applet, and the Table) must be displayed on three separate pages. You must create a main page with links to each of these pages. Your links must use IMAGES as demonstrated on the previous page (look at the code for the link that got you to this page). Your link pictures should contain the words LOGO, JAVA, and TABLE. Your link pictures should also be nicely decorated to make them look interesting, cool, neat, wonderful, fantastic, and/or awesome.
--------------------------------------------
NEW JAVA COMMANDS:
g.drawString(String, int, int); This command is used to draw words in your applet. You call it in your paint method (just like drawRect or fillOval) .The int values control how far over and how far down on the page the word is displayed. The String value is the actual word(s) that are displayed. Here's an example:

g.drawString("Hello there!", 20, 20); This example will display the string "Hello there!" on the screen starting at the point (20,20).

g.drawString(w, 20, 20); This example uses a variable which contains a string value to display a word.

g.getParameter(String); This method is used to retrieve a value from the web page hosting the applet. The String supplied as the argument to getParameter must match the NAME used in the PARAM tag. You call getParameter in the init method of your applet. Here's an example:

w=getParameter("id"); Before the init method you should declare a String variable like this:
String w; Then you load a value into it as shown with the getParameter method. Then you are free to use variable w in the paint method as shown in the drawString example.