I am new to applets.If I can get some help on missing environment I would be greatfull.
After going through the documents relating applets on SUN web site.I downloaded HelloWorld.java file in the JDK/bin directory.
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
Compiled it to create the class file.Then created the followin HTML file:
<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>
Here is the output of my program:
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>
When I type at the internet explorer 6 browser E:\j2sdk1.4.1_01\bin\HelloWorld.html
it displays the above HTML file written.
But does not display the ouput that it is supposed to.
All the files are present under E:\j2sdk1.4.1_01\bin directory.
At the DOS prompt if I type in Appletviewer HelloWorld.html it does the same.
Kindly help me as to what mistake I am making relating the missing environment.
Eagerly awaiting to hear.
thanks
After going through the documents relating applets on SUN web site.I downloaded HelloWorld.java file in the JDK/bin directory.
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
Compiled it to create the class file.Then created the followin HTML file:
<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>
Here is the output of my program:
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>
When I type at the internet explorer 6 browser E:\j2sdk1.4.1_01\bin\HelloWorld.html
it displays the above HTML file written.
But does not display the ouput that it is supposed to.
All the files are present under E:\j2sdk1.4.1_01\bin directory.
At the DOS prompt if I type in Appletviewer HelloWorld.html it does the same.
Kindly help me as to what mistake I am making relating the missing environment.
Eagerly awaiting to hear.
thanks