102 Program to show status on Applet in Java

Code:

import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;

/*
<applet code="Parameter" height=300 width=200>
<param name="Coding" value="Coding Atharva" /> 
</applet>
*/

public class Parameter extends Applet
{
String msg;

public void init()
{
setBackground(Color.green);
msg = getParameter("Coding");
}

public void paint(Graphics g)
{
showStatus(msg);
}

}




Ouput:

showStatus on Applet

Previous
Next Post »