/* * FileIOApplication.java * * Created on September 15, 2004, 3:03 PM */ /** * * @author levenick */ import java.io.*; public class FileIOApplication extends java.awt.Frame { /** Creates new form FileIOApplication */ public FileIOApplication() { initComponents(); setBounds(20,20,600,600); } /** 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 theTA = new java.awt.TextArea(); readButton = new java.awt.Button(); setLayout(null); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); add(theTA); theTA.setBounds(20, 50, 480, 470); readButton.setLabel("read"); readButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { readButtonActionPerformed(evt); } }); add(readButton); readButton.setBounds(220, 30, 57, 22); pack(); }//GEN-END:initComponents private void readButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_readButtonActionPerformed PrintStream out = System.out; out.println("greetings"); System.out.println("greetings?"); out.println("greetings"); new FileHandler() . processAFile(theTA); }//GEN-LAST:event_readButtonActionPerformed /** 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 FileIOApplication().show(); } // Variables declaration - do not modify//GEN-BEGIN:variables private java.awt.Button readButton; private java.awt.TextArea theTA; // End of variables declaration//GEN-END:variables }