Designing-creating html document and link to java applets


For this project, you need to design and create the HTML document (also referred to as a “Web page”), in which certain basic HTML elements are incorporated. Your HTML document should also link to several Java applets, some of which you would compile yourself from the code provided, and some you would get from online sources and simply link to in your HTML document.

Additionally you would input, compile, and test a simple Java application. Unlike Java Applets, that are linked and run from within HTML files, Java applications run freestanding, and could be run from DOS Command Line.

This project is designed to familiarize you with the Java tools and processes, including editing, compiling, and viewing applets and applications, also with the methods for using Java Applets in Web documents.

There are two related learning objectives involved:

1. Creating HTML documents.

2. Using Java Development Kit tools (primarily the compiler and appletviewer) to edit, compile, and test Java Applets (which will then be run from your HTML pages) and

Applications (that could be run from Command Prompt).
Your Web page design must use the effective background image or pattern, and various colours, text sizes, and images to create a visually effective design. The Web page must also include your name, course name and number, an email link to you, and links to the required Java Applets and navigation links to facilitate easy movement within pages.

The project has two parts:

• Part 1—Applets you would create from code provided.

• Part 2—A sample downloadable Applet, that you would get from the online source. These usually include ready-to-run Class files, as well as the HTML code which launches them.

The recommended procedure for completing this project is as follows:

1. Review all the project instructions and study the JAVA PROJECT DEMO.

2. Build HTML pages (without the Java Applet links for now), and test them for navigation and other basic functionality.

3. Download and install the present active version of Java Development Kit from https://java.com/en/ and set your classpath as per the detailed instructions provided.

4. If essential , work through DOS tutorial (DOS Primer) to familiarize yourself with basic command line functions, including:

• opening and using an MS-DOS window

• changing directories

• running programs from the command line

• viewing file lists (directory command) in DOS

• editing batch files to set path commands

6. Input, compile, and test the Part 1 Applets, and link them to your HTML pages.

7. Download and test the Part 2 sample Applet of your choice, then add the HTML code to your Project pages.

There are extensive links for tutorials, software tools, and other useful resources at the Virtual Helpdesk. Check both the Course Tools and the Java Help sections. Links to other required and useful resources can be found below.

ACQUIRING THE TOOLS AND SAMPLE FILES

1. Download and install the Java Development Kit (version 1.4.2 or higher) by following the instructions on the Virtual Helpdesk Page—Getting Started Java (JDK).
The downloaded file is the Java 2 SDK installer, and is named j2sdk-1_4_2_x-windows-i586.exe (assuming a Windows download). After running the installer file (by double clicking on it), you can view the installed components in the folder c:\j2sdk1.4.2_ on your hard disk. To recover disk space, you can delete the installer file after you have completed the installation. Note, version number or x pertains to the latest version number available from Sun Microsystems, and therefore it may vary. 

2. Set your path to the JDK using the instructions from the Virtual Helpdesk Java Help files.

3. Download and install the Programmer’s File Editor (NOTE: This is optional. Java code and HTML may also be input and edited using Notepad.)
Functioning Java Class Files for PART 2 may be obtained online from Sun Microsystems’ Applets page.

PART 1—SAMPLE APPLETS TO BE INPUT AND COMPILED

You are given with Java code for two Java applets below. In each case, the text must be typed into either WordPad or a Programmer’s File Editor, then saved as named, compiled using javac compiler included in your JDK, and tested using appletviewer. At last, the working applets must be linked to Part 1 of your HTML document.

Triangle.java

import java.awt.*;
import java.applet.Applet;
public class Triangle extends Applet {
public void paint (Graphics g){
int bottomX=80;
int bottomY=200;
1int base=100;
int height=100;
g.drawLine(bottomX,bottomY,bottomX+base,bottomY);
g.drawLine(bottomX+base,bottomY,bottomX+base/2,bottomY-height);
g.drawLine(bottomX+base/2,bottomY-height, bottomX,bottomY);
}
}

Oval.java

import java.awt.*;
import java.applet.*;
public class Oval extends Applet {
public void paint (Graphics g) {
Color c=new Color(20,120,160);
g.setColor(c);
g.fillOval(20,20,60,30);
}
}

PART 2—USING AN EXISTING APPLET

Obtain ONE of the sample applets from Sun Microsystems’ Applets page, or any other source for free Java applets you may wish to use. Test the applet, and link it to Part 2 of your HTML page(s).

Functioning Java Class Files for PART 2 may be obtained online from Sun Microsystems’ Applets page.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Designing-creating html document and link to java applets
Reference No:- TGS01915

Expected delivery within 24 Hours