I am brand new to java and I am reading the JAVA Tutorial given out by sun. There seems to be a slight problem though.....they give me the famous Hello World demo that looks like this:
and then the html doc that should look like this:Code:import java.applet.*; import java.awt.*; /** * The HelloWorld class implements an applet that * simply displays "Hello World!". */ public class HelloWorld extends Applet { public void paint(Graphics g) { // Display "Hello World!" g.drawString("Hello world!", 50, 25); } }
Now all is said and done and I compile the class file. Now when I run it in applet viewer it runs fine but when I run it in IE I get a grey box and thats it. Now...I have in my IE options the Java Console Enabled and the JIT compiler for vm enabled. Any ideas?Code:<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>





Reply With Quote