Define applet. Write a program to create an applet to display message “Welcome to java applet”. in Java
Java applet is a small dynamic Java program that can be transferred via the Internet and
run by a Java-compatible Web browser. The main difference between Java-based
applications and applets is that applets are typically executed in an appletviewer or Javacompatible Web browser. All applets
import the java.awt package. /**/
import java.applet.*;
import java.awt.*;
public class WelcomeJava extends Applet
{
public void paint(Graphics g)
{
g.drawString(“Welcome to java”,25,50);
}
}
import the java.awt package. /**/
import java.applet.*;
import java.awt.*;
public class WelcomeJava extends Applet
{
public void paint(Graphics g)
{
g.drawString(“Welcome to java”,25,50);
}
}
Comments
Post a Comment
If you have any query, please let us know