home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / SAMPLES.BIN / About.java < prev    next >
Encoding:
Java Source  |  1996-12-03  |  1.9 KB  |  81 lines

  1. /*
  2.     A basic extension of the java.awt.Frame class
  3.  */
  4.  
  5. import java.awt.*;
  6.  
  7. public class About extends Frame {
  8.     void close_Clicked(Event event) {
  9.  
  10.  
  11.         //{{CONNECTION
  12.         // Hide the Frame
  13.         hide();
  14.         //}}
  15.  
  16.  
  17.     }
  18.  
  19.  
  20.     public About() {
  21.  
  22.         //{{INIT_CONTROLS
  23.         setLayout(null);
  24.         addNotify();
  25.         resize(insets().left + insets().right + 658,insets().top + insets().bottom + 264);
  26.         setBackground(new Color(16384));
  27.         nervousText1 = new symantec.itools.multimedia.NervousText();
  28.         nervousText1.reshape(insets().left + 13,insets().top + 3,611,91);
  29.         add(nervousText1);
  30.         nervousText1.setText("Visual Cafe Multimedia Samples");
  31.         nervousText2 = new symantec.itools.multimedia.NervousText();
  32.         nervousText2.reshape(insets().left + 9,insets().top + 132,641,71);
  33.         add(nervousText2);
  34.         nervousText2.setText("(c) Copyright 1996 Symantec Corporation");
  35.         nervousText3 = new symantec.itools.multimedia.NervousText();
  36.         nervousText3.reshape(insets().left + 202,insets().top + 71,218,76);
  37.         add(nervousText3);
  38.         nervousText3.setText("Version 1.0");
  39.         close = new java.awt.Button("Close");
  40.         close.reshape(insets().left + 283,insets().top + 218,92,24);
  41.         add(close);
  42.         setTitle("Untitled");
  43.         //}}
  44.  
  45.         //{{INIT_MENUS
  46.         //}}
  47.     }
  48.  
  49.     public About(String title) {
  50.         this();
  51.         setTitle(title);
  52.     }
  53.  
  54.     public synchronized void show() {
  55.         move(50, 50);
  56.         super.show();
  57.     }
  58.  
  59.     public boolean handleEvent(Event event) {
  60.         if (event.id == Event.WINDOW_DESTROY) {
  61.             hide();         // hide the Frame
  62.             return true;
  63.         }
  64.         if (event.target == close && event.id == Event.ACTION_EVENT) {
  65.             close_Clicked(event);
  66.             return true;
  67.         }
  68.         return super.handleEvent(event);
  69.     }
  70.  
  71.     //{{DECLARE_CONTROLS
  72.     symantec.itools.multimedia.NervousText nervousText1;
  73.     symantec.itools.multimedia.NervousText nervousText2;
  74.     symantec.itools.multimedia.NervousText nervousText3;
  75.     java.awt.Button close;
  76.     //}}
  77.  
  78.     //{{DECLARE_MENUS
  79.     //}}
  80. }
  81.