Java Example Program / Sample Source Code
import java.applet.*;
import java.awt.*;
public class GettingAppletParameter extends Applet {
private String defaultValue = "Hello! Param";
public void paint(Graphics g) {
String param = this.getParameter("Param");
if (param == null) {
param = defaultValue;
}
g.drawString(param, 50, 25);
}
} |
|
|