0% found this document useful (0 votes)
17 views

Roblem Description: Solution:: How To Create A Basic Applet?

To create a basic Applet, extend the Applet class and override the paint method. Draw text or other graphics in the paint method using the Graphics object passed to it. The Applet must then be embedded in an HTML page to be displayed in a web browser.

Uploaded by

udayahari
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Roblem Description: Solution:: How To Create A Basic Applet?

To create a basic Applet, extend the Applet class and override the paint method. Draw text or other graphics in the paint method using the Graphics object passed to it. The Applet must then be embedded in an HTML page to be displayed in a web browser.

Uploaded by

udayahari
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

roblem Description:

How to create a basic Applet?

Solution:
Following example demonstrates how to create a basic Applet by extending
Applet Class.You will need to embed another HTML code to run this
program.
import java.applet.*;
import java.awt.*;

public class Main extends Applet{


public void paint(Graphics g){
g.drawString("Welcome in Java Applet.",40,20);
}

You might also like