+ 4
What are applets in java ?
details about applet and if possible please send code also
4 Answers
+ 5
thanks @vipul
+ 3
AnĀ appletĀ is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its disposal.
A "Hello, World" Applet
Following is a simple applet named HelloWorldApplet.java ā
import java.applet.*;
import java.awt.*;
public class HelloWorldApplet extends Applet {
public void paint (Graphics g) {
g.drawString ("Hello World", 25, 50);
}
}
These import statements bring the classes into the scope of our applet class ā
java.applet.Appletjava.awt.Graphics
Without those import statements, the Java compiler would not recognize the classes Applet and Graphics, which the applet class refers to.
+ 2
I hope i helped.
Happy Coding š
+ 1
Did you googled it before asking here ?