Java applet
Step1:
([Link]) file name
Code:
import [Link].*;
import [Link].*;
public class HelloApplet extends Applet
public void paint(Graphics g)
[Link]("hello i am leo ",65,35);
Setp2:
compile the java file and then we get the class file
([Link]) you save it any file name
Code:
<html>
<head>
<body>
<applet code="[Link]" width="400" height="200"> //put the correct class file
name
</applet>
</body>
</head>
</html>
Java applet
File directory structure:
Once you compile the [Link] file we get the class file
Setp3:
1) Don’t set the path directly compile the file.
[Link] file is created in the directory.
Java applet
Step4:
1) Run the html file
Step5:
Output: