Applet

An applet in Java is a small Java program that can be embedded into a webpage. It is a type of software called a "browser applet" or "appetizer," and it runs in the user's web browser. Applets are written using the Java programming language and are typically used for creating interactive components or games for web pages. They require a Java Virtual Machine (JVM) to run, which is already installed on most modern computers.

Java applet is used design the project in java In the applet main function is not used Commentes also should be written in applet file(programs) To compile the Programe have to open cmd box type javac and filename And to run it we have to type Appletviewer filename .java


import java.awt.*; 
import java.applet.*;
/*
< applet code="Applet1" width=300 height=200 >
< /applet>
*/
public class Applet1 extends Applet
{
    public void init ()
    {
        Label	one =	new Label("One");
        Label	two =	new Label("Two");
        Label	three	= new Label("Three");
        
        add(one);
        add(two);
        add(three);
    }                                                               

Output: