home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / FrameDemo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-09-08  |  1.1 KB  |  20 lines

  1. import java.applet.Applet;
  2. import java.awt.Component;
  3. import java.awt.Container;
  4. import java.awt.Frame;
  5. import java.awt.TextArea;
  6. import java.awt.Window;
  7.  
  8. public class FrameDemo extends Applet {
  9.    public void init() {
  10.       int var1 = Integer.parseInt(((Applet)this).getParameter("width"));
  11.       int var2 = Integer.parseInt(((Applet)this).getParameter("height"));
  12.       String var3 = "There are two ways of constructing a software design.\nOne way is to make it so simple\nthat there are obviously no deficiencies.\nAnd the other way is to make it so complicatedthat there are no obvious deficiencies.\n\nC.A.R. Hoare\n\n";
  13.       TextArea var4 = new TextArea(var3, 80, 40);
  14.       Frame var5 = new Frame("Demo Frame");
  15.       ((Component)var5).setSize(var1, var2);
  16.       ((Container)var5).add("Center", var4);
  17.       ((Window)var5).show();
  18.    }
  19. }
  20.