home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / WDESAMPL.BIN / DescriptionFrame.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-09-18  |  1.5 KB  |  46 lines

  1. import java.awt.Button;
  2. import java.awt.Color;
  3. import java.awt.Component;
  4. import java.awt.Container;
  5. import java.awt.Event;
  6. import java.awt.Frame;
  7. import java.awt.Panel;
  8. import java.awt.TextArea;
  9. import java.awt.Window;
  10.  
  11. class DescriptionFrame extends Frame {
  12.    static final int rows = 27;
  13.    static final int cols = 70;
  14.    TextArea info;
  15.    Button cancel;
  16.  
  17.    DescriptionFrame() {
  18.       super("Animator v1.9");
  19.       ((Container)this).add("Center", this.info = new TextArea(27, 70));
  20.       this.info.setEditable(false);
  21.       this.info.setBackground(Color.white);
  22.       Panel var1 = new Panel();
  23.       ((Container)this).add("South", var1);
  24.       ((Container)var1).add(this.cancel = new Button("Cancel"));
  25.       ((Window)this).pack();
  26.    }
  27.  
  28.    public void show() {
  29.       this.info.select(0, 0);
  30.       super.show();
  31.    }
  32.  
  33.    void tell(String var1) {
  34.       this.info.appendText(var1);
  35.    }
  36.  
  37.    public boolean action(Event var1, Object var2) {
  38.       if (var1.target == this.cancel) {
  39.          ((Component)this).hide();
  40.          return true;
  41.       } else {
  42.          return false;
  43.       }
  44.    }
  45. }
  46.