<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6860903055290578116</id><updated>2011-11-27T16:19:45.701-08:00</updated><category term='ActionListener'/><category term='keylistener'/><category term='JEDI'/><category term='FileInputStream'/><title type='text'>Cooking Java</title><subtitle type='html'>I welcome everyone to my blog. This blog is dedicated for java codes, java projects, java problems, anything about Java Programming Language.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cookingjava.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cookingjava.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>e R L y N</name><uri>http://www.blogger.com/profile/03559072024659441327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6860903055290578116.post-8194018159877993621</id><published>2007-09-30T06:11:00.000-07:00</published><updated>2007-09-30T06:32:39.324-07:00</updated><title type='text'>File Handling: Using FileOutputStream</title><content type='html'>If you want to &lt;span style="font-style: italic;"&gt;write&lt;/span&gt; to a file we use the FileOutputStream class. &lt;code&gt;FileOutputStream&lt;/code&gt; is meant for writing streams of raw bytes  such as image data.&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt; (from JAVA API)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The following are constructors of this class from &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html"&gt;JAVA API&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;table summary="" border="1" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr class="TableRowColor" bgcolor="white"&gt;&lt;td&gt;&lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html#FileOutputStream%28java.io.File%29"&gt;FileOutputStream&lt;/a&gt;&lt;/b&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html" title="class in java.io"&gt;File&lt;/a&gt; file)&lt;/code&gt; &lt;br /&gt;          Creates a file output stream to write to the file represented by   the specified &lt;code&gt;File&lt;/code&gt; object.&lt;/td&gt; &lt;/tr&gt; &lt;tr class="TableRowColor" bgcolor="white"&gt; &lt;td&gt;&lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html#FileOutputStream%28java.io.File,%20boolean%29"&gt;FileOutputStream&lt;/a&gt;&lt;/b&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html" title="class in java.io"&gt;File&lt;/a&gt; file,                  boolean append)&lt;/code&gt; &lt;br /&gt;          Creates a file output stream to write to the file represented by   the specified &lt;code&gt;File&lt;/code&gt; object.&lt;/td&gt; &lt;/tr&gt; &lt;tr class="TableRowColor" bgcolor="white"&gt; &lt;td&gt;&lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html#FileOutputStream%28java.io.FileDescriptor%29"&gt;FileOutputStream&lt;/a&gt;&lt;/b&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileDescriptor.html" title="class in java.io"&gt;FileDescriptor&lt;/a&gt; fdObj)&lt;/code&gt; &lt;br /&gt;          Creates an output file stream to write to the specified file   descriptor, which represents an existing connection to an actual   file in the file system.&lt;/td&gt; &lt;/tr&gt; &lt;tr class="TableRowColor" bgcolor="white"&gt; &lt;td&gt;&lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html#FileOutputStream%28java.lang.String%29"&gt;FileOutputStream&lt;/a&gt;&lt;/b&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class in java.lang"&gt;String&lt;/a&gt; name)&lt;/code&gt; &lt;br /&gt;          Creates an output file stream to write to the file with the   specified name.&lt;/td&gt; &lt;/tr&gt; &lt;tr class="TableRowColor" bgcolor="white"&gt; &lt;td&gt;&lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html#FileOutputStream%28java.lang.String,%20boolean%29"&gt;FileOutputStream&lt;/a&gt;&lt;/b&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class in java.lang"&gt;String&lt;/a&gt; name,                  boolean append)&lt;/code&gt; &lt;br /&gt;          Creates an output file stream to write to the file with the specified  &lt;code&gt;name&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SAMPLE CODE:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's use the code from the sample code of &lt;a href="http://cookingjava.blogspot.com/2007/09/file-handling-reading-from-file.html"&gt;FileInputStream&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;/**&lt;br /&gt;* @(#)ReadFile.java&lt;br /&gt;*&lt;br /&gt;* @JEDI Phase II Course Material&lt;br /&gt;* @With comments insertions from&lt;br /&gt;* @                         erlyn manguilimotan&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class ReadFile {&lt;br /&gt;&lt;br /&gt;  public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;  BufferedReader fileRead = new BufferedReader (new InputStreamReader(System.in));&lt;br /&gt;  String fileName = "";&lt;br /&gt;  System.out.println("Enter the name of the file to Open");&lt;br /&gt;     try{&lt;br /&gt;      fileName=fileRead.readLine(); //input the name of the file&lt;br /&gt;  }catch(IOException e1){&lt;br /&gt;                           }//end of catch&lt;br /&gt;&lt;br /&gt;  FileInputStream rf = null; //create an object for FileInputStream&lt;br /&gt;&lt;br /&gt;  try{&lt;br /&gt;  rf = new FileInputStream(fileName); //connects the object with the file name&lt;br /&gt;  }catch(FileNotFoundException e2){&lt;br /&gt;      System.out.println("File not found...");&lt;br /&gt;      }//end of catch&lt;br /&gt; &lt;br /&gt;  try{&lt;br /&gt;      char data; //variable to hold the data&lt;br /&gt;      int temp=0;&lt;br /&gt;      do{&lt;br /&gt;          temp=rf.read(); //  Reads a byte of data from this input stream.&lt;br /&gt;          data = (char) temp; //stores the data into variable data&lt;br /&gt;          if(temp!=-1) //while it's not the end of file&lt;br /&gt;          {&lt;br /&gt;              System.out.print(data);&lt;br /&gt;                     }&lt;br /&gt;      }while(temp!=-1); //ends the loop if it's the end of file.&lt;br /&gt; &lt;br /&gt;  }catch(IOException e3){&lt;br /&gt;      System.out.println("Problem in reading the file..");&lt;br /&gt;&lt;br /&gt;}//end of  catch&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;//WE WILL INSERT THE CODE HERE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;     }   //end of main&lt;br /&gt;}//end of class&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: georgia; font-size: 85%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Now let us insert the following code as indicated above:&lt;br /&gt;*************************************************************&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255); font-family: courier new;font-size:85%;" &gt;System.out.println("---------------------------------------");&lt;br /&gt;    System.out.println("Now let's try to add a line in the file");&lt;br /&gt;    System.out.println("We will use the same file");&lt;br /&gt;   &lt;br /&gt;    FileOutputStream  fos = null; //creates object for FileOutputStream&lt;br /&gt;    try{&lt;br /&gt;        fos = new FileOutputStream(fileName); //connects the object to the file&lt;br /&gt;    }catch(FileNotFoundException e4){        //exceptions&lt;br /&gt;        System.out.println("File cannot be opened for writing");&lt;br /&gt;        }&lt;br /&gt;   &lt;br /&gt;    try{&lt;br /&gt;        boolean done = false; //used to text the loop&lt;br /&gt;        int data;&lt;br /&gt;        do{//do while the line is not a '.'&lt;br /&gt;            data=fileRead.read();// read from keyboard&lt;br /&gt;            if((char) data =='.')&lt;br /&gt;                  done=true;&lt;br /&gt;            else&lt;br /&gt;                fos.write(data); //write to file&lt;br /&gt;        }while(!done);&lt;br /&gt;    }catch(IOException e5){&lt;br /&gt;        System.out.println("Problem in reading from file");&lt;br /&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: georgia; font-size: 85%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;*************************************************************&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;font-size:100%;" &gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;Compile and execute the program. Check on syntax errors.&lt;br /&gt;&lt;br /&gt;Note: Make sure you still have the text file you had earlier.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;QUESTION:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;      What happened to your text file? Check the content of your text file again.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: georgia; font-weight: bold;font-size:100%;" &gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;font-size:100%;" &gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6860903055290578116-8194018159877993621?l=cookingjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingjava.blogspot.com/feeds/8194018159877993621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6860903055290578116&amp;postID=8194018159877993621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/8194018159877993621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/8194018159877993621'/><link rel='alternate' type='text/html' href='http://cookingjava.blogspot.com/2007/09/file-handling-using-fileoutputstream.html' title='File Handling: Using FileOutputStream'/><author><name>e R L y N</name><uri>http://www.blogger.com/profile/03559072024659441327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6860903055290578116.post-5453589555719241437</id><published>2007-09-30T02:36:00.000-07:00</published><updated>2007-09-30T02:52:06.400-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FileInputStream'/><title type='text'>File Handling: Reading from a File</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;To read input data, by default we use the computer keyboard. However, some of the data we need maybe stored in some data file. For example, if you have a class record stored in a file and you want to retrieve it, or simply want to read a text file using your java program. &lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;Reading from a file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;The &lt;i style=""&gt;FileInputStream &lt;/i&gt;class allows you to read data from a file. &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;The class has the following constructors:&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;o&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;code&gt;&lt;b&gt;&lt;span style="font-size:10;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html#FileInputStream%28java.io.File%29"&gt;FileInputStream&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="font-size:10;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html" title="class in java.io"&gt;File&lt;/a&gt; file)&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;        Creates a &lt;code&gt;&lt;span style="font-size:10;"&gt;FileInputStream&lt;/span&gt;&lt;/code&gt; by opening a connection to an actual file, the file named by the &lt;code&gt;&lt;span style="font-size:10;"&gt;File&lt;/span&gt;&lt;/code&gt; object &lt;code&gt;&lt;span style="font-size:10;"&gt;file&lt;/span&gt;&lt;/code&gt; in the file system. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;o&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;code&gt;&lt;b&gt;&lt;span style="font-size:10;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html#FileInputStream%28java.io.FileDescriptor%29"&gt;FileInputStream&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="font-size:10;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileDescriptor.html" title="class in java.io"&gt;FileDescriptor&lt;/a&gt; fdObj)&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;        Creates a &lt;code&gt;&lt;span style="font-size:10;"&gt;FileInputStream&lt;/span&gt;&lt;/code&gt; by using the file descriptor &lt;code&gt;&lt;span style="font-size:10;"&gt;fdObj&lt;/span&gt;&lt;/code&gt;, which represents an existing connection to an actual file in the file system. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;o&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;code&gt;&lt;b&gt;&lt;span style="font-size:10;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html#FileInputStream%28java.lang.String%29"&gt;FileInputStream&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="font-size:10;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class in java.lang"&gt;String&lt;/a&gt; name)&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;        Creates a &lt;code&gt;&lt;span style="font-size:10;"&gt;FileInputStream&lt;/span&gt;&lt;/code&gt; by opening a connection to an actual file, the file named by the path name &lt;code&gt;&lt;span style="font-size:10;"&gt;name&lt;/span&gt;&lt;/code&gt; in the file system.&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;&lt;span style="font-size:85%;"&gt;(Descriptions taken from &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html"&gt;http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html&lt;/a&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;Let’s try the FileInputStream class.&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify; font-weight: bold;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;First, create a text file and save it in the same directory where you create the class.&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify; font-weight: bold;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;Second, try this code:&lt;/p&gt;&lt;span style="font-style: italic; color: rgb(51, 51, 255);font-family:courier new;font-size:85%;"  &gt;/**&lt;br /&gt;* @(#)ReadFile.java&lt;br /&gt;*&lt;br /&gt;* @JEDI Phase II Course Material&lt;br /&gt;* @With comments insertions from&lt;br /&gt;* @                         erlyn manguilimotan&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class ReadFile {&lt;br /&gt;&lt;br /&gt;   public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;   BufferedReader fileRead = new BufferedReader (new InputStreamReader(System.in));&lt;br /&gt;   String fileName = "";&lt;br /&gt;   System.out.println("Enter the name of the file to Open");&lt;br /&gt;      try{&lt;br /&gt;       fileName=fileRead.readLine(); //input the name of the file&lt;br /&gt;   }catch(IOException e1){&lt;br /&gt;                            }//end of catch&lt;br /&gt;&lt;br /&gt;   FileInputStream rf = null; //create an object for FileInputStream&lt;br /&gt;&lt;br /&gt;   try{&lt;br /&gt;   rf = new FileInputStream(fileName); //connects the object with the file name&lt;br /&gt;   }catch(FileNotFoundException e2){&lt;br /&gt;       System.out.println("File not found...");&lt;br /&gt;       }//end of catch&lt;br /&gt;   &lt;br /&gt;   try{&lt;br /&gt;       char data; //variable to hold the data&lt;br /&gt;       int temp=0;&lt;br /&gt;       do{&lt;br /&gt;           temp=rf.read(); //  Reads a byte of data from this input stream.&lt;br /&gt;           data = (char) temp; //stores the data into variable data&lt;br /&gt;           if(temp!=-1) //while it's not the end of file&lt;br /&gt;           {&lt;br /&gt;               System.out.print(data);&lt;br /&gt;                      }&lt;br /&gt;       }while(temp!=-1); //ends the loop if it's the end of file.&lt;br /&gt;   &lt;br /&gt;   }catch(IOException e3){&lt;br /&gt;       System.out.println("Problem in reading the file..");&lt;br /&gt;       }//end of  catch&lt;br /&gt;     }   //end of main&lt;br /&gt; }//end of class&lt;/span&gt;        &lt;p class="MsoNormal" style="text-align: justify; font-weight: bold;"&gt;&lt;o:p style="color: rgb(51, 51, 255);"&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;/o:p&gt;Compile and execute the code.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;NOTE! Make sure you have a text file to open! You may want to use the following contents for your text file:&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;  &lt;span style="font-style: italic;"&gt;  Hello World!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    This is a sample file to be read by a java file.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    How does the output appear on your screen?&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;/o:p&gt;*******************************************************************************&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6860903055290578116-5453589555719241437?l=cookingjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingjava.blogspot.com/feeds/5453589555719241437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6860903055290578116&amp;postID=5453589555719241437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/5453589555719241437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/5453589555719241437'/><link rel='alternate' type='text/html' href='http://cookingjava.blogspot.com/2007/09/file-handling-reading-from-file.html' title='File Handling: Reading from a File'/><author><name>e R L y N</name><uri>http://www.blogger.com/profile/03559072024659441327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6860903055290578116.post-7504209173379181015</id><published>2007-09-27T01:24:00.000-07:00</published><updated>2007-09-27T01:39:44.750-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JEDI'/><title type='text'>Java Education and Development  Initiative (JEDI)</title><content type='html'>JEDI is a project of Sun Microsystems, Inc through the Java Research and Development Center of the University of the Philippines.  Its partnership with the Philippine Society of IT Educators (PSITE) was launched way back in February 2005 during the PSITE National Conference in Cagayan de Oro City. I was there during its launching.&lt;br /&gt;&lt;br /&gt;Ateneo de Zamboanga University is one of the JEDI School members. As a member school, we have access to JEDI course materials, faculty training, online community, software and other development tools to mention some benefits.&lt;br /&gt;&lt;br /&gt;Teachers of our department have joined the JEDI Phase I and II Training. In Phase II, I was one of the participants of the Software Engineering Course held in Dipolog City last May 2007.&lt;br /&gt;&lt;br /&gt;I am using the JEDI course materials for my classes. I share this with my students so I need spend much time to prepare for my classes. Just review and practice some codes then I am ready for my class!&lt;br /&gt;&lt;br /&gt;JEDI is such a help to the academic community. For more information, please visit http://jedi.upcompsci.net/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Be a JEDI SCHOOL!!! Join now!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6860903055290578116-7504209173379181015?l=cookingjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingjava.blogspot.com/feeds/7504209173379181015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6860903055290578116&amp;postID=7504209173379181015' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/7504209173379181015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/7504209173379181015'/><link rel='alternate' type='text/html' href='http://cookingjava.blogspot.com/2007/09/java-education-and-development.html' title='Java Education and Development  Initiative (JEDI)'/><author><name>e R L y N</name><uri>http://www.blogger.com/profile/03559072024659441327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6860903055290578116.post-911032499800175729</id><published>2007-09-27T00:45:00.000-07:00</published><updated>2007-09-27T01:23:33.441-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionListener'/><category scheme='http://www.blogger.com/atom/ns#' term='keylistener'/><title type='text'>Adding Java Listeners</title><content type='html'>In my class, we are now doing GUI  using Abstract Window Toolkit (AWT). In one of our lab exercises, we mimicked a messenger window where the user types in the message and by pressing the "enter" key or by clicking the SEND button, the message is transfered to the display area.&lt;br /&gt;&lt;br /&gt;To add listeners, for the buttons &lt;span style="font-style: italic;"&gt;SEND&lt;/span&gt; and&lt;span style="font-style: italic;"&gt; QUIT&lt;/span&gt; I used the &lt;span style="font-style: italic;"&gt;ActionListeners&lt;/span&gt; and for the "ENTER"key, I used the&lt;span style="font-style: italic;"&gt; KeyListener&lt;/span&gt; and added it to the TextArea object &lt;span style="font-style: italic;"&gt;msg&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here's the resulting window for the given code:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; * @(#)MyMessenger.java&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; * @Erlyn Q. Manguilimotan&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; *  Computer Science Department&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; *    Ateneo de Zamboanga University&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; * @version 1.00 2007/9/26&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt; */&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;import java.awt.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;import java.awt.event.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;       &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public class MyMessenger extends Frame implements ActionListener, KeyListener{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    private TextArea disp; // object for the display area&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    private TextArea msg; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;// object for the message area&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public MyMessenger(){&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    Panel dispPanel = new Panel();   &lt;br /&gt;  //panel where the TextArea object disp is to be placed&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    Panel msgPanel = new Panel();  &lt;br /&gt;  //panel where the TextArea object msg is to be placed&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;      Panel buttonsPanel = new Panel();&lt;br /&gt;  //panel where the buttons send and quit &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;are to be placed&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    Button send = new Button("SEND");//button for SEND&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    Button quit = new Button("QUIT");//button for QUIT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    disp = new TextArea("",8,30,TextArea.SCROLLBARS_VERTICAL_ONLY); &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    //textarea for disp with 8 rows and 30 columns &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    msg = new TextArea("",8,30,TextArea.SCROLLBARS_VERTICAL_ONLY);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    //textarea for disp with 8 rows and 30 columns &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    disp.setBackground(Color.PINK); //set background of display area to pink&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    disp.set&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;Editable(false); //set the display area to not editable mode&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    setSize(300,350); //set framesize&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    setLayout(new BorderLayout());//set Frame layout&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    setBackground(Color.lightGray); //set frame background color&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    setTitle("My Messenger"); //set Frame title &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    add(dispPanel,BorderLayout.NORTH); //add panels to the frame&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    add(msgPanel&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;,BorderLayout.CENTER);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    add(buttonsPanel,BorderLayout.SOUTH);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    dispPanel.add(disp); //add d&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;isp TextArea to dispPanel&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    msgPanel.add(msg);//add msg TextArea to msgpPanel&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    msg.addKeyListener(this);//add key listener to msg TextArea&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    buttonsPanel.add(send); //add buttons to panel&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    buttonsPanel.add(quit);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    send.addActionListener(this); // add ActionListener to button when clicked&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    quit.addActionListener(this);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    addWindowListener(new FrameListener()); //adding window Listener&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    setResizable(false);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    setVisible(true);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public static void main(String args[])&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;      MyMessenger ym = new MyMessenger(); // instantiating MyMessenger Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public void actionPerformed (ActionEvent e)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   if(e.getActionComm&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;and()=="SEND") //if SEND button is clicked&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   {       String temp="";    //temp string&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;           temp=msg.getText(); //recieves the text from msg TextArea&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;         disp.append(temp);  //transfers by append method to display area&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;        msg.setText("");   //sets message area to empty again&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;         System.exit(0);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public void keyPressed (KeyEvent e){&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   if(e.getKeyCode()== e.VK_ENTER) //if Enter key is pressed&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   {       String temp="";    //temp string&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;           temp=msg.getText(); //recieves the text from msg TextArea&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;         disp.append(temp);  //transfers by append method to display area&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;        msg.setText("");   //sets message area to empty again&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public void keyReleased(KeyEvent e){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;public void keyTyped (KeyEvent e){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_QJjvG-VPNBg/RvtnXGJY85I/AAAAAAAAAC8/gqTfWvtT2Hg/s1600-h/Mesgner.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_QJjvG-VPNBg/RvtnXGJY85I/AAAAAAAAAC8/gqTfWvtT2Hg/s320/Mesgner.JPG" alt="" id="BLOGGER_PHOTO_ID_5114795448293979026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To close the window, I used a class called FrameListener.java which extends WindowAdapter. Here's the code:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;import java.awt.event.WindowEvent;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;import java.awt.event.WindowAdapter;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;class FrameListener extends WindowAdapter&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;   public void windowClosing(WindowEvent e)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;  {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;    System.exit(0);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You may try this code. This still needs some improvement or polishing. You may suggest some codes on how to improve the GUI.&lt;br /&gt;&lt;br /&gt;Thank you...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6860903055290578116-911032499800175729?l=cookingjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingjava.blogspot.com/feeds/911032499800175729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6860903055290578116&amp;postID=911032499800175729' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/911032499800175729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/911032499800175729'/><link rel='alternate' type='text/html' href='http://cookingjava.blogspot.com/2007/09/adding-java-listeners.html' title='Adding Java Listeners'/><author><name>e R L y N</name><uri>http://www.blogger.com/profile/03559072024659441327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_QJjvG-VPNBg/RvtnXGJY85I/AAAAAAAAAC8/gqTfWvtT2Hg/s72-c/Mesgner.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6860903055290578116.post-3440885223141848399</id><published>2007-09-26T07:47:00.000-07:00</published><updated>2007-09-27T00:43:31.041-07:00</updated><title type='text'>Introduction</title><content type='html'>Hey guys!&lt;br /&gt;&lt;br /&gt;Let's learn Java Programming Language!&lt;br /&gt;&lt;br /&gt;I welcome everyone to my blog. This blog is dedicated for java codes, java projects, java problems, anything about Java Programming Language.&lt;br /&gt;&lt;br /&gt;I'm teaching Java for the first time. I thought it is VERRRYY difficult, but no! Object-oriented programming is one great concept and Java just have it all.&lt;br /&gt;&lt;br /&gt;Let's learn the Java language together! Join me as I enter tutorial notes, experiences with Java programming and some codes I started tinkering for my classes.&lt;br /&gt;&lt;br /&gt;Thanks for dropping by!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6860903055290578116-3440885223141848399?l=cookingjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookingjava.blogspot.com/feeds/3440885223141848399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6860903055290578116&amp;postID=3440885223141848399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/3440885223141848399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6860903055290578116/posts/default/3440885223141848399'/><link rel='alternate' type='text/html' href='http://cookingjava.blogspot.com/2007/09/introduction.html' title='Introduction'/><author><name>e R L y N</name><uri>http://www.blogger.com/profile/03559072024659441327</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
