Forum Stats

  • 3,815,586 Users
  • 2,259,054 Discussions
  • 7,893,176 Comments

Discussions

About Java Applet

TechGeek!
TechGeek! Member Posts: 9
edited Aug 29, 2019 9:37AM in Social Groups

Hi there!,

          I am new to java and was trying to execute a Java Applet program.... but unfortunately it ended up with some error.

The Applet window successfully shown off but it had something written "start:Applet not initialized".

I don't know what exactly the problem is.......

Can any one guide me in finding the right solution for this.

--------------------------------------------------------------------------------------------------------

Error: Applet not initialized

Java code:-

import java.awt.*;

import java.applet.*;

class Hello extends Applet

{

public void paint(Graphics g)

{

g.drawString("Hey! This is Java Applet...What's up??",100,100);

}

}

HTML code:-

<!doctype html>

<html>

<head></head>

<body>

<Applet code="Hello" height=500 width=500></Applet>

</body>

</html>

I ran the above codes and encountered "Applet not Initialized" Error..... What changes should I make in my code??

Regards,

TG.