Write an applet application to
display Table lamp.The color of lamp should get change randomly
import java.applet.*;
public class Lamp extends
java.applet.Applet {
public void paint(Graphics g) {
// the lamp shade; two arcs
Lamp.html
<html>
<body>
<applet
code="Lamp.class" width="300"
height="300">
</applet>
</body>
</html>
Output-
C:\Program
Files\Java\jdk1.7.0_80\bin>javac Lamp.java
C:\Program
Files\Java\jdk1.7.0_80\bin>appletviewer Lamp.html