Hello All,
I have this Java code -
(Which is compiled into HelloWorld.class)Code:import java.applet.*; import java.awt.*; public class HelloWorld extends Applet { public void init() { } // This method gets called when the applet is terminated // That's when the user goes to another page or exits the browser. public void stop() { } // The standard method that you have to use to paint things on screen // This overrides the empty Applet method, you can't called it "display" for example. public void paint(Graphics g) { //method to draw text on screen // String first, then x and y coordinate. g.drawString("Hey hey hey",20,20); g.drawString("Hellooow World",20,40); } }
and this html
However, when I load the html page, the java applet just saysHTML Code:<html> <head> <title>My First Java Applet</title> </head> <body> Here's my first Java Applet:<br /><br /> <applet code="HelloWorld.class" width="300" height ="300"> </body> </html>
Error. Click for details
When I click, it freezes the webpage (and the browser).
Any suggestions on what to do?




Bookmarks