Java Applet


APPLET

import javax.swing.JApplet;

import java.awt.Graphics;

public class Main extends javax.swing.JApplet {

public Main(){

}

public void paint(Graphics g){

super.paint(g);

for(int counter=1;counter<=10;counter++){

g.drawLine(10,10,250,counter*10);

}

}

}

HTML

<HTML>

<HEAD>

<TITLE>Applet HTML Page</Title>

</HEAD>

<BODY>

<APPLET CODE=”Main.class”width=350 height=200></APPLET>

</BODY>

</HTML>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s