Simple Java Applet



$$ This is the Simplest Java Applet for Demonstration of how it is look like

My first Applet In Learning Java:-

/*
Author: Ketan Kulkarni
Copyright: Self Made on Self Study
Date & Time: 12/01/2020 12:01 AM
Software Used: JDK 13.0.1,Command prompt,Jcreater LE
*/

import java.applet.Applet;
import java.awt.Graphics;
public class ketanl extends Applet{
public void paint(Graphics g){
g.drawString("I love u mom..!",150,150);
}
}
/*
<applet code="ketan.class" width="300" height="400">
</applet>
*/

Save the above file as ketanl.java
on Compilation the Class file of same will automatically generated

ketankulkarni23.blogspot.com

After make a new HTML file like this:-

<html>
<body>
<applet code="ketanl.class" width="300" height="400">
</applet>
</body>
</html>

Save this file with any name

Now, its time to Run the Applet:-



After this Clicking on Enter the Applet Window will  Display Like this:-


Comments

Popular posts from this blog

Packages and Interfaces in java

Magic Square Program