Hi am really new to applets. I am reading a book on creating applets and i am trying to create the HelloWorld applet. I am also using Netbeans for this. The code i have used is as follows.
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet
{
/** Creates a new instance of HelloWorld */
public void init()
{
}
public void paint(Graphics g)
{
g.drawString("Hello Luong", 50, 25);
}
}
After reading this book it now tells me to compile it using the java compiler but everytime i try to compile this i ALWAYS get the message:
<no main class found>
can somebody tell me what i need to do cos i have seen this example in many tutorials and there is no main class. I have attached the project folder for viewing.
In the book it also reads that i need to create an html file with the code:
<html>
<head>
<title>
Simple Applet
</title>
</head>
<body>
Here is the output of my applet:
<APPLET CODE = "HelloWorld.class" width = 150 height=25 </APPLET>
</body>
<html>
But before adding the html code, i need to sort out the main class issue. Can somebody give me some advice.
The location of my applet is
C:\MyNBProjects\Concurrent Programming\HelloWorld.java
Thanks