title: Display a text file into a jTextArea base on the option selected in the jComboBox
body: <p>I want to display a text file in a jtextarea based on the option selected int he jcombobox. This is my code but it does not seem to work properly</p>
  <pre><code>private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
          if(jComboBox1.getSelectedItem() == &quot;Enchanted&quot;)
          {
               try {
                  String textLine;
                  FileReader fr = new FileReader(&quot;enchanted.txt&quot;);
                  BufferedReader reader = new BufferedReader(fr);
  
                  while((textLine=reader.readLine()) != null){
  
                      jTextArea2.read(reader, &quot;jTextArea2&quot;);
                  }
              }
                      catch (IOException ioe) {
                  System.err.println(ioe);
                  System.exit(1);
              }
              }
      
      }       
  </code></pre>