Friday, 10 July 2015

creating Applet in Java
Applet is one of the most Important Feature of Java. As because of introduction of java the functionality of Web Browser is Increases
and servlet increases the Functionality of server this is the main difference between Applet and Servlet...
The Applet viewer is the window in which we see the output of the Applet Program

PROGRAM IN APPLET


package javaapplication20;
import java.applet.*; 
import java.awt.*;
import java.io.*;
public class JavaApplication20  extends Applet
{                                                                         
public void paint(Graphics g)
{
    g.drawRect(200, 100, 400, 200);
    g.fillRect(200, 100, 400, 200);
    Font f=new Font("arial",Font.BOLD|Font.ITALIC,18);
    g.setFont(f);
    g.setColor(Color.white);
    g.drawString("WELCOME TO THE WORLD OF JAVA!!!", 250, 200);
}

                                            OUTPUT


 

No comments:

Post a Comment