title: change Jtable Cell Value
body: <p>I have a jtable that keep book file records and sho them.</p>
  
  <p>I create a "Borrow" jbutton that when clicked to a row that not borrowed, The "Borrow Status" of that row should change to "Yes".</p>
  
  <p>I use this codes, but did not changed!</p>
  
  <pre><code>public class user_AllBooks extends AbstractTableModel{
  BookInformation book_info=new BookInformation();
  String[] columns=new String[]{"Book Name","Book Date", "Book ID","Borrow Status"};
  ArrayList&lt;BookInformation&gt; bData=new ArrayList&lt;BookInformation&gt;();
  
  public user_AllBooks(){
      try{
          BufferedReader br=new BufferedReader(new FileReader("AllBookRecords.txt"));
          String line;
          while((line = br.readLine()) != null){
              bData.add(initializeBookData(line));
          }
          br.close();
      }
      catch(IOException ioe){
  
      }
  }
  
  public BookInformation initializeBookData(String myline){
      BookInformation book_infos=new BookInformation();
      String[] celledLine=myline.split("     ");
      book_infos.setBookName(celledLine[0]);
      book_infos.setBookDate(celledLine[1]);
      book_infos.setBookID(celledLine[2]);
      book_infos.setBorrowStatus(celledLine[3]);
      return book_infos;
  }
  
  @Override
  public String getColumnName(int col){
      return columns[col];
  }
  
  @Override
  public int getRowCount() {
      if(bData != null){
          return bData.size();
      }
      else{
          return 0;
      }
  }
  
  @Override
  public int getColumnCount() {
      return columns.length;
  }
  
  @Override
  public Object getValueAt(int rowIndex, int columnIndex) {
      BookInformation bookInf=bData.get(rowIndex);
      Object value;
  
      switch(columnIndex){     
          case 0:
              value=bookInf.getBookName();
              break;
          case 1:
              value=bookInf.getBookDate();
              break;
          case 2:
              value=bookInf.getBookID();
              break;
          case 3:
              value=bookInf.getBorrowStatus();
              break;
          default :
              value="...";
      }
      return value;    
  }
  }
  </code></pre>
  
  <p>Second Class:</p>
  
  <pre><code>public class user_AllBooksM extends JFrame implements ActionListener{
  user_AllBooks uAllBooks=new user_AllBooks();
  final JTable bTable=new JTable(uAllBooks);
  JButton borrowButton;
  public user_AllBooksM(){
      setTitle("All Books");
      exitButton=new JButton("Exit");
      borrowButton=new JButton("Borrow");
      borrowButton.addActionListener(this);
      JPanel Bpanel=new JPanel();
      Bpanel.setLayout(new FlowLayout());
      JScrollPane sp=new JScrollPane(bTable);
      Bpanel.add(sp);
      Bpanel.add(borrowButton);
      this.add(Bpanel);
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      this.setBounds(300, 60, 550, 550);
      this.setResizable(false);
      this.setVisible(true);
  }
  
  @Override
  public void actionPerformed(ActionEvent event) {
          borrowInitialize(bTable.getSelectedRow());  
  }
  
  public void  borrowInitialize(int row){
      if(uAllBooks.getValueAt(row, 3).equals("yes")) {
          JOptionPane.showMessageDialog(null, "This Book Was Borrowed");
      }
      else{
          uAllBooks.setValueAt("Yes", row, 3);
          uAllBooks.fireTableRowsUpdated(row, row);
      }
  }
  
  public static void main(String[] args){
      new user_AllBooksM();
  }
  
  }
  </code></pre>
  
  <p>Thanks.</p>