home *** CD-ROM | disk | FTP | other *** search
/ Java by Example / jbecd.bin / JBE-CD / NTUsers / JBECODE.ZIP / JavaByExample / chap26 / ConfigApplet.class (.txt) next >
Encoding:
Java Class File  |  1996-03-12  |  723 b   |  19 lines

  1. import java.applet.Applet;
  2. import java.awt.Component;
  3. import java.awt.Font;
  4. import java.awt.Graphics;
  5.  
  6. public class ConfigApplet extends Applet {
  7.    String str;
  8.  
  9.    public void init() {
  10.       this.str = ((Applet)this).getParameter("text");
  11.       Font var1 = new Font("TimesRoman", 1, 24);
  12.       ((Component)this).setFont(var1);
  13.    }
  14.  
  15.    public void paint(Graphics var1) {
  16.       var1.drawString(this.str, 50, 50);
  17.    }
  18. }
  19.