ParmInfoDemopublic class ParmInfoDemo extends Applet Null Demo, just demonstrates getParameterInfo() and getAppletInfo() |
Methods Summary |
---|
public java.lang.String | getAppletInfo()Return information about this applet.
return "ParmInfoDemo Applet, Version 0\n" +
"Copyright Learning Tree International";
| public java.lang.String[][] | getParameterInfo()Return list of allowable parameters.
String param_info[][] = {
{"fontsize", "10-20", "Size of font"},
};
return param_info;
| public void | init()Init routine: set a font, initialize UI components.
setLayout(new FlowLayout());
String psize = getParameter("fontsize");
if (psize == null) psize = "12";
System.out.println("Fontsize is " + psize);
Font f = new Font("Helvetica", Font.PLAIN,
Integer.parseInt(psize));
Label l = new Label("Font Demo");
l.setFont(f);
add(l);
|
|