Experiment 28
Experiment 28
Experiment 28
Aim: Develop minimum two basic Applets. Display output with applet
viewer and browser.
//Exp28.java
import java.applet.Applet;
import java.awt.*;
g.setFont(font);
}
//Exp28.html
<html>
<head>
<title>Basic Applet</title>
</head>
<body>
<applet>
</body>
</html>
Output:
Program 2: Develop a program to implement all methods of applet.
//Exp28_1.java
import java.applet.Applet;
import java.awt.*;
System.out.println("\nInitializing applet...");
System.out.println("\nDestroying applet...");
}
public void paint(Graphics g)
g.setFont(font);
//Exp28_1.html
<html>
<head>
</head>
<body>
</applet>
</body>
</html>
Output:
Program 3: Develop a program using control loops in applets.
//Exp28_2.java
import java.applet.Applet;
import java.awt.*;
x += 70;
//Exp28_2.html
<html>
<head>
</head>
<body>
</applet>
</body>
</html>
Output: