0
can anyone give an example of java applet?
5 Answers
+ 1
An applet is a Internet-based program written in java, a programming language for the Web. The applet is also able to run in HTML. The applet is usually embedded in an HTML page on a Web site and can be executed from within a browser.
+ 1
okay thank you i somewhat get it .
+ 1
its ok :)
and u always have google and youtube for learning farther. tc
0
/*
    Basic Java Applet Example
    This Java example shows how to create a basic applet using Java Applet class.
*/
Â
import java.applet.Applet;
import java.awt.Graphics;
Â
/*
    <applet code = "BasicAppletExample" width = 200 height = 200>
    </applet>
*/
public class BasicAppletExample extends Applet{
   Â
     public void paint(Graphics g){
         //write text using drawString method of Graphics class
        g.drawString("This is my First Applet",20,100);
     }
}
0
thanx . i am a beginner and don't understand java code .i just want to know what an applet is? a webpage or browser etc ?