home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1999 March / maximum-cd-1999-03.iso / Feature / Lotus / ORGANIZE / COMPNENT / LTOUIN21.ZIP / sun / activator / ConsoleWindow.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-03-12  |  1.7 KB  |  59 lines

  1. package sun.activator;
  2.  
  3. import java.awt.Component;
  4. import java.awt.Container;
  5. import java.awt.Frame;
  6. import java.awt.TextArea;
  7. import java.awt.Window;
  8. import java.awt.event.WindowEvent;
  9. import java.awt.event.WindowListener;
  10.  
  11. class ConsoleWindow extends Frame implements WindowListener {
  12.    private TextArea textArea;
  13.    private boolean bOpened;
  14.  
  15.    ConsoleWindow() {
  16.       super("Java Console");
  17.       ((Component)this).setSize(100, 100);
  18.       ((Frame)this).setResizable(true);
  19.       this.textArea = new TextArea();
  20.       ((Container)this).add(this.textArea);
  21.       ((Window)this).addWindowListener(this);
  22.    }
  23.  
  24.    public synchronized void append(String var1) {
  25.       this.textArea.setText(this.textArea.getText() + var1);
  26.    }
  27.  
  28.    public void show() {
  29.       if (!this.bOpened) {
  30.          this.bOpened = true;
  31.          ((Window)this).pack();
  32.          super.show();
  33.       }
  34.  
  35.    }
  36.  
  37.    public void windowActivated(WindowEvent var1) {
  38.    }
  39.  
  40.    public void windowClosed(WindowEvent var1) {
  41.    }
  42.  
  43.    public void windowClosing(WindowEvent var1) {
  44.       ((Frame)this).dispose();
  45.    }
  46.  
  47.    public void windowDeactivated(WindowEvent var1) {
  48.    }
  49.  
  50.    public void windowDeiconified(WindowEvent var1) {
  51.    }
  52.  
  53.    public void windowIconified(WindowEvent var1) {
  54.    }
  55.  
  56.    public void windowOpened(WindowEvent var1) {
  57.    }
  58. }
  59.