HomeSitemapForumsLessons  

Lesson 15

Inserting Java Applets in FrontPage

This tutorial is written in order to show how to place a Java Applet into a web page that is built in FrontPage. It is adapted from Lorraine's Lakes - snow applet tutorial. You will need to download the class file provided on that page and you will refer to that page for the source code needed for the applet.

  1. You will create a new page by clicking on File then New then Page or Web and when task pane appears choose Blank Page.
  2. Build your page with backgrounds, images and text as you want it to appear as I have done here.
  3. Once your page is complete you are ready to add the Java Applet to the page. You will first find out the measurements of the graphic you will be using for the applet. My graphic is 233X300 pixels. (If you inserted your graphic into your page already you can get the dimensions of it by clicking on the graphic then going to HTML view and looking at the highlighted text, it will give you the image information.)
  4. Make sure you have unzipped the alcsnow.class file into the same folder you are saving your page into.
  5. Copy the code from Lorraine's Lakes - snow applet tutorial (link above) and paste it into notepad. (If you don't FrontPage isn't very friendly with copy and paste from anything other than notepad, at least in my experiences with it I've always pasted to notepad then copy from notepad to FrontPage)
  6. If you inserted your graphic into the page earlier click on it so it shows being highlighted and go to HTML view.
  7. Copy the code from notepad and paste in over the highlighted text shown in HTML view.
  8. Change the width and height of the applet code to match the width and height of your graphic, and change the alt= to name your graphic. The line for my page will appear as: <applet code="alcsnow.class" width="233" height="300" name= "snow" alt="City Sidewalks">
  9. On the next line you will want to change the parameter value to the name of the graphic you will be using. My graphic is city-sidewalks1.jpg so the line appears on my page as: <param name="grph" value="city-sidewalks1.jpg">
  10. You can leave the other lines as they are or change them to your preference. See Lorraine's page for the description of what each line represents.
  11. You should now be able to go to the Preview pane and view your applet.
  12. Save your page. It would also be a good gesture to give credit to the author of the Java Applet. You may find that this is a requirement with some Java Applets. Here is my finished page.

 

   Site Map

    Copyright © 2001-2005 Margaret Walker