//
//    butterf_2 generated Thu Jan 07 22:25:42 EST 1999
//
//    Black Dirt Software, Inc. 

import java.awt.event.*; 

import javax.swing.*; 

import javax.swing.border.*;


import java.awt.*; 
import java.util.*; 
import java.applet.Applet; 
import java.net.*;

public class butterf_2 extends JFrame implements WindowListener {

    CheckboxGroup group = new CheckboxGroup(); //used or reserved for radio buttons
    MenuBar topMenu = new MenuBar();           //used or reserved for menus
    Timer  Timer1 = new Timer(200, new Timer1Listener()); 
    ImageIcon MainImage = new ImageIcon("Main.jpg");
    JLabel Main = new JLabel();

    ImageIcon CloseWingsImage = new ImageIcon("CloseWings.jpg");
    JLabel CloseWings = new JLabel();


    ImageIcon OpenWingsImage = new ImageIcon("OpenWings.jpg");
    JLabel OpenWings = new JLabel();

    JButton  Command1 = new JButton("Exit"); 

    int z = 0;
    int y = 0;
    boolean closed = true;

    public butterf_2() {

      Timer1.start();
      addWindowListener(this);
      getContentPane().setLayout(null);
      setBounds (78, 101, 501, 294 );
      setFont(new Font( "Dialog", Font.BOLD, 12));
      getContentPane().setBackground(new Color( 255,255,255));



      getContentPane().add(Main);
      Main.setBounds( getInsets().left + getInsets().right + 24,  getInsets().top + getInsets().bottom + 176, 77, 77);
      Main.setIcon(MainImage);


//      getContentPane().add(CloseWings);
//      CloseWings.setBounds( getInsets().left + getInsets().right + 128,  getInsets().top + getInsets().bottom + 16, 77, 77);
//      CloseWings.setIcon(CloseWingsImage);




//      getContentPane().add(OpenWings);
//      OpenWings.setBounds( getInsets().left + getInsets().right + 24,  getInsets().top + getInsets().bottom + 16, 77, 77);
//      OpenWings.setIcon(OpenWingsImage);


      getContentPane().add(Command1);
      Command1.setBounds( getInsets().left + getInsets().right + 400,  getInsets().top + getInsets().bottom + 224, 73, 33);
      Command1.setMnemonic( 'x');

      Command1.addActionListener( new ActionListener() {
        public void actionPerformed(ActionEvent e) { // clicked
             System.exit(0);
        } // end clicked
      }); // end Command1 clicked

      setMenuBar(topMenu);    //always set for frame, can be removed if no Menus
    }  // end init

  public butterf_2(String title) {
      this();
      setTitle(title); 
  }

    public void windowClosed(WindowEvent event) {
    }
    public void windowDeiconified(WindowEvent event) {
    }
    public void windowIconified(WindowEvent event) {
    }
    public void windowActivated(WindowEvent event) {
    }
    public void windowDeactivated(WindowEvent event) {
    }
    public void windowOpened(WindowEvent event) {
    }
    public void windowClosing(WindowEvent event) {
            System.exit(0);
         }

    public static void main(String args[]){
      butterf_2 f = new butterf_2();
      f.show();
      }

      class Timer1Listener implements ActionListener {  // Timer
        public void actionPerformed(ActionEvent evt) {
          z+=20;
          y+=5;
          if (closed){
               closed = false;
               Main.setIcon(OpenWingsImage);
             } else{
               closed = true;
               Main.setIcon(CloseWingsImage);
             }
          Main.setBounds( getInsets().left + getInsets().right + 24 + z,  getInsets().top + getInsets().bottom + 176 -y, 77, 77);
        } // end  actionPerformed
      }; // end classTimer1 Listener


}  // end class


