title: Write in txt file, edit, display in JOptionPane
body: <p>How do I: </p>
  
  <p><strong>Write in .txt file:</strong> Automatically create 100 blank records (fields: record id,name,age,etc) in a .txt file at the start of the program. Record id wont be blank</p>
  
  <p><strong>edit:</strong> I will enter a record id (ranging from 1-100) to add or edit data to the blank record, record id cant be edited </p>
  
  <p><strong>display in <code>JOptionPane</code>:</strong> I will enter a record id and all corresponding data will be displayed in <code>JOptionPane</code> (I know how to use <code>JOptionPane</code> to display stuff, but i dont know how to display only the selected data from a .txt file) </p>
  
  <p>Can anyone please help to me how to do a program like this? 
  I know java, but im still a noob.</p>
  
  <p>ok so far this is what I've got. no idea what to do next</p>
  
  <pre><code>import java.io.BufferedWriter;
  import java.io.File;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.OutputStreamWriter;
  import java.io.Writer;
  
  public class writer {
  public void writing() {
      try {
          File Text = new File(filepath here);
          FileOutputStream FOS = new FileOutputStream(Text);
          OutputStreamWriter OSW = new OutputStreamWriter(FOS);    
          Writer w = new BufferedWriter(OSW);
          for(int x=1;x&lt;101;x++){
          w.write("Account #"+x);
          }w.close();
      } catch (IOException e) {
          System.err.println("Problem writing to the file!");
      }
  }
  
  public static void main(String[]args) {
      writer write = new writer();
      write.writing();
  }
  }
  </code></pre>