home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / WDETOUR.BIN / Plane.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-03-11  |  1.7 KB  |  48 lines

  1. import java.applet.Applet;
  2. import java.awt.Component;
  3. import java.awt.Container;
  4. import java.awt.LayoutManager;
  5. import java.beans.PropertyVetoException;
  6. import java.net.MalformedURLException;
  7. import java.net.URL;
  8. import symantec.itools.lang.Context;
  9. import symantec.itools.multimedia.Animator;
  10. import symantec.itools.net.RelativeURL;
  11.  
  12. public class Plane extends Applet {
  13.    Animator animatorPlane;
  14.  
  15.    public void init() {
  16.       Context.setApplet(this);
  17.       ((Container)this).setLayout((LayoutManager)null);
  18.       ((Component)this).setSize(520, 79);
  19.       this.animatorPlane = new Animator();
  20.       this.animatorPlane.setPreviewMode(true);
  21.  
  22.       try {
  23.          URL[] tempURL = new URL[15];
  24.          tempURL[0] = RelativeURL.getURL("Images/plane01.gif");
  25.          tempURL[1] = RelativeURL.getURL("Images/plane02.gif");
  26.          tempURL[2] = RelativeURL.getURL("Images/plane03.gif");
  27.          tempURL[3] = RelativeURL.getURL("Images/plane04.gif");
  28.          tempURL[4] = RelativeURL.getURL("Images/plane05.gif");
  29.          tempURL[5] = RelativeURL.getURL("Images/plane06.gif");
  30.          tempURL[6] = RelativeURL.getURL("Images/plane07.gif");
  31.          tempURL[7] = RelativeURL.getURL("Images/plane08.gif");
  32.          tempURL[8] = RelativeURL.getURL("Images/plane09.gif");
  33.          tempURL[9] = RelativeURL.getURL("Images/plane10.gif");
  34.          tempURL[10] = RelativeURL.getURL("Images/plane11.gif");
  35.          tempURL[11] = RelativeURL.getURL("Images/plane12.gif");
  36.          tempURL[12] = RelativeURL.getURL("Images/plane13.gif");
  37.          tempURL[13] = RelativeURL.getURL("Images/plane14.gif");
  38.          tempURL[14] = RelativeURL.getURL("Images/plane15.gif");
  39.          this.animatorPlane.setImageList(tempURL);
  40.       } catch (MalformedURLException var2) {
  41.       } catch (PropertyVetoException var3) {
  42.       }
  43.  
  44.       this.animatorPlane.setBounds(192, 0, 128, 71);
  45.       ((Container)this).add(this.animatorPlane);
  46.    }
  47. }
  48.