/* * EyeApplet.java * * Created on April 20, 2005, 10:03 AM */ /** * * @author levenick */ public class EyeApplet extends java.applet.Applet { Eye rightEye = new Eye(); /** Initializes the applet EyeApplet */ public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } setSize(500,500); rightEye.setX(100); rightEye.setY(100); } public void paint(java.awt.Graphics g) { rightEye.paint(g); } /** This method is called from within the init() method 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 button1 = new java.awt.Button(); button2 = new java.awt.Button(); button3 = new java.awt.Button(); button4 = new java.awt.Button(); setLayout(null); button1.setLabel("button1"); button1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button1ActionPerformed(evt); } }); add(button1); button1.setBounds(50, 270, 57, 24); button2.setLabel("button2"); button2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button2ActionPerformed(evt); } }); add(button2); button2.setBounds(110, 270, 57, 24); button3.setLabel("button3"); button3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button3ActionPerformed(evt); } }); add(button3); button3.setBounds(230, 270, 57, 24); button4.setLabel("button4"); button4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button4ActionPerformed(evt); } }); add(button4); button4.setBounds(300, 270, 57, 24); }//GEN-END:initComponents private void button4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button4ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_button4ActionPerformed private void button3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button3ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_button3ActionPerformed private void button2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button2ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_button2ActionPerformed private void button1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button1ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_button1ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private java.awt.Button button1; private java.awt.Button button2; private java.awt.Button button3; private java.awt.Button button4; // End of variables declaration//GEN-END:variables }