/*
 * LearnJava2.java
 *
 * Created on March 20, 2002, 12:33 AM
 */

/**
 *
 * @author  Pat
 */
public class LearnJava2 extends javax.swing.JFrame {
    
    /** Creates new form LearnJava2 */
    public LearnJava2() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        timer1 = new org.netbeans.examples.lib.timerbean.Timer();
        molecule1 = new sunw.demo.molecule.Molecule();

        timer1.addTimerListener(new org.netbeans.examples.lib.timerbean.TimerListener() {
            public void onTime(java.awt.event.ActionEvent evt) {
                timer1OnTime(evt);
            }
        });

        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
            }
        });

        getContentPane().add(molecule1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 20, -1, -1));

        pack();
    }//GEN-END:initComponents

    private void timer1OnTime(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timer1OnTime
        molecule1.rotateOnX();
    }//GEN-LAST:event_timer1OnTime
    
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
        System.exit(0);
    }//GEN-LAST:event_exitForm
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        new LearnJava2().show();
    }
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private sunw.demo.molecule.Molecule molecule1;
    private org.netbeans.examples.lib.timerbean.Timer timer1;
    // End of variables declaration//GEN-END:variables
    
}

