/* * ButtonTFApplet.java * * Created on April 20, 2005, 9:00 PM */ /** * * @author levenick */ public class ButtonTFApplet extends java.applet.Applet { /** Initializes the applet ButtonTFApplet */ public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } } /** 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(); textField1 = new java.awt.TextField(); 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(100, 60, 57, 24); textField1.setText("textField1"); add(textField1); textField1.setBounds(210, 60, 60, 20); }//GEN-END:initComponents private void button1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button1ActionPerformed textField1.setText("greetings!"); }//GEN-LAST:event_button1ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private java.awt.Button button1; private java.awt.TextField textField1; // End of variables declaration//GEN-END:variables }