/******************************************************************************
*  My first Java applet program to print Hello and name                           
******************************************************************************/

import javax.swing.JApplet;         //import swing JApplet class
import java.awt.Graphics;           //import awt Graphics class

public class HelloApplet1 extends JApplet {         //this is a subclass of JApplet

    public void paint(Graphics g) {                 //auto called by Applet

        String name;

        name = "Sam Sultan";
        
        g.drawString("Hello " + name, 20, 90);       //call the drawString method
    }
}