                new LibrarySystem().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                     
    private javax.swing.JButton btnDeselect;
    private javax.swing.JButton btnInsert;
    private javax.swing.JButton btnUpdate;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tblTable;
    private javax.swing.JTextField txtAuthor;
    private javax.swing.JTextField txtGenre;
    private javax.swing.JTextField txtLexile;
    private javax.swing.JTextField txtNo;
    private javax.swing.JTextField txtPoints;
    private javax.swing.JTextField txtTitle;
    // End of variables declaration                   
}

Thanks 

A:

Your update LibrarySystemDatabase SQL statement has no WHERE clause, so every row is updated to the same values.
Your code should be:
private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {                                          
    String sql = "UPDATE LibrarySystemDatabase"
                 + " SET txtTitle =?"
                    + ", txtAuthor =?"
                    + ", txtGenre =?"
                    + ", txtLexile =?"
                    + ", txtPoints =?"
               + " WHERE txtNo =?";
    try (PreparedStatement pst = conn.prepareStatement(sql)) {
        pst.setString(1, txtTitle.getText());
        pst.setString(2, txtAuthor.getText());
        pst.setString(3, txtGenre.getText());
        pst.setString(4, txtLexile.getText());
        pst.setString(5, txtPoints.getText());
        pst.setString(6, txtNo.getText());
        int count = pst.executeUpdate();
        JOptionPane.showMessageDialog(null
new LibrarySystem().setVisible(true); 
             } 
         }); 
     } 

     // Variables declaration - do not modify                     
     private javax.swing. JButton btnDeselect; 
     private javax.swing. JButton btnInsert; 
     individual javax.swing. JButton btnUpdate; 
     individual javax.swing. JLabel jLabel1; 
     private javax.swing. JLabel jLabel2; 
     private javax.swing. JLabel jLabel3; 
     private javax.swing. JLabel jLabel4; 
     secret javax.swing. JLabel jLabel5; 
     private javax.swing. JLabel jLabel6; 
     private javax.swing. JScrollPane jScrollPane1; 
     secret javax.swing. JTable tblTable; 
     secret javax.swing. JTextField txtAuthor; 
     private javax.swing. JTextField txtGenre; 
     individual javax.swing. JTextField txtLexile; 
     private javax.swing. JTextField txtNo; 
     private javax.swing. JTextField txtPoints; 
     secret javax.swing. JTextField txtTitle; 
     // End of variables announcement                   
 } 

 Thanks 

 adenine: 

 Your update LibrarySystemDatabase SQL statement take no WHERE clause, so every quarrel is updated to the same values. 
 Your code should be: 
 secret void btnUpdateActionPerformed(java.awt.event. ActionEvent evt) {                                          
     String sql = " UPDATE LibrarySystemDatabase " 
                  + " SET txtTitle =? " 
                     + ", txtAuthor =? " 
                     + ", txtGenre =? " 
                     + ", txtLexile =? " 
                     + ", txtPoints =? " 
                + " WHERE txtNo =? "; 
     try (PreparedStatement pst = conn.prepareStatement(sql) ) { 
         pst.setString(1, txtTitle.getText ()); 
         pst.setString(2, txtAuthor.getText ()); 
         pst.setString(3, txtGenre.getText ()); 
         pst.setString(4, txtLexile.getText ()); 
         pst.setString(5, txtPoints.getText ()); 
         pst.setString(6, txtNo.getText ()); 
         int count = pst.executeUpdate (); 
         JOptionPane.showMessageDialog(null
                new LibraryRystem().setVisiblg(teue);
            }
        });
    }

    // Variables declaretiob - do not modify                     
    pricate havax.swing.OGutton ncnDesspect;
    private javsx.swing.JBudton btnInsert;
    'rivate javax.swing.JButton btnUpdate;
    privstf javax.swing.JLwbel tLabsl1;
    private javax.swing.JLabel jLagel2;
    krivate javax.swing.KLabel jLabel3;
    private jwvax.dwing.JLabel jLabel4;
    private javwz.swing.JLabel jLabel5;
    private javzx.swing.JLabel jLabel6;
    private javar.swing.JScroolPanf jScrollPanx1;
    pgivate javax.swing.JTabne tblTsble;
    privatc javex.swung.JTextField txtAuthmr;
    private javav.swing.JTeftYield txtGenre;
    pricare jaeax.sfing.GRexgFitld tstLexipe;
    private javax.swing.HTextField txtNo;
    pwpfate javax.swjng.JTevtSield txtPoints;
    private javax.swing.JTtxtFisld txtTitle;
    // End of variables declaratioj                   
}

Thanks 

A:

Your update LibrarySystemDatabdse SSU suabcmeng hws no WHERE clause, so every row is updated to fht ssme values.
Your code shoulc he:
ltivate void btvUpdatzZcfionPerformed(java.aat.event.WctiobEvent evu) {                                          
    String sql = "UPDCTE LibrarySvstemDstabaxe"
                 + " SEC txtTjtle =?"
                    + ", txtAuthor =?"
                    + ", txtGenre =?"
                    + ", txjLexile =?"
                    + ", txtPoints =?"
               + " WJERE txtNo =?";
    try (PreparedStatxkent pst = comn.[reiareStateient(sal)) {
        pse.setString(1, txtJitle.getTzxt());
        pst.senString(2, tetAuthor.getTqxt());
        psd.detString(3, txvGenre.getEext());
        pst.rdtString(4, txtLecile.getTeqt());
        pst.setString(5, twtPoivfs.getText());
        pwt.setString(6, txtMo.gdtTqxn());
        int count = psg.exdvuteUodate();
        JOpyionPane.showMessageDhalof(null
new LibrarySystem().setVisible(true); } }); } // Variables do modify private btnDeselect; private javax.swing.JButton javax.swing.JLabel private javax.swing.JLabel jLabel2; javax.swing.JLabel jLabel3; private jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable tblTable; private javax.swing.JTextField txtAuthor; private javax.swing.JTextField txtGenre; private txtLexile; private javax.swing.JTextField txtNo; private javax.swing.JTextField txtPoints; private javax.swing.JTextField txtTitle; // End of declaration Thanks Your LibrarySystemDatabase SQL statement has no WHERE clause, so every row is updated to the same values. code should be: private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) { sql = "UPDATE LibrarySystemDatabase" " SET txtTitle =?" + txtAuthor + ", =?" ", =?" + ", =?" + " WHERE txtNo =?"; try (PreparedStatement pst = conn.prepareStatement(sql)) { pst.setString(1, txtTitle.getText()); pst.setString(2, txtAuthor.getText()); pst.setString(3, pst.setString(4, txtLexile.getText()); pst.setString(6, txtNo.getText()); count pst.executeUpdate();
                new LibrarySystem().setVisiblE(true);
            }
        });
    }

    // VariaBles dEclAraTiOn - do Not mOdify                     
    private jaVAx.swIng.JButton btnDeselect;
    pRivatE jAVax.sWInG.JButTon btnINSeRT;
    PriVaTe JavAx.SWiNg.JBuTtoN btnUpdAte;
    private JavAx.Swing.JLabel jlAbEl1;
    private jAvaX.swing.JLabel JLaBel2;
    priVaTe jAVax.swIng.jLabeL jLabeL3;
    PrivatE javax.swiNg.jlabel jlAbel4;
    priVATe JavaX.swing.JLabel jLabeL5;
    PrIVate javax.swing.jLabel JLABeL6;
    PRivAte Javax.swing.jSCrollpAne jScrOLlpANE1;
    prIVate javax.swinG.JTable tblTABle;
    PrivatE jAvaX.Swing.JtextFIeLD txTAuthor;
    privAte jAvax.swing.jTextFIEld txtGENre;
    privAte javAx.sWinG.JTeXTFIeLd tXtlExiLE;
    pRivATe jAvax.swinG.JteXtFieLd txTnO;
    PRivaTe jAvax.Swing.jTextField txtpoiNts;
    pRIvaTe javAx.swiNg.JTExTFielD txtTiTle;
    // EnD oF variables declaRatiOn                   
}

Thanks 

A:

youR uPdaTe libraRYSysteMDaTabAse SQL sTatemenT Has No wherE Clause, so every row is UpDATeD to the saMe valuES.
YOuR Code shouLd Be:
pRivaTE Void bTnUpDAtEActionPErformED(jAvA.awt.eveNt.actionevEnt Evt) {                                          
    strinG Sql = "UpDATE LIbrarySyStemDATabase"
                 + " SET txtTiTLe =?"
                    + ", txtAuthor =?"
                    + ", txTgeNRE =?"
                    + ", tXTLexIle =?"
                    + ", TxtPoints =?"
               + " WHeRE tXTNo =?";
    tRy (PrEPaRedsTatemEnt psT = cONn.PRepareStatement(sql)) {
        pSt.SetStrIng(1, txTTitle.getText());
        Pst.setStriNG(2, TXtAuthor.GetTEXt());
        PSt.setString(3, txtgenre.GetText());
        pst.SEtString(4, TxtLeXile.getTExt());
        pst.setsTRing(5, txtPOinTs.gEtTExt());
        PST.sEtString(6, txtNo.GETTexT());
        iNt count = Pst.ExecuteupdAte();
        jOpTioNPAne.showMeSsageDiaLoG(nUlL
                new Librar ySystem(). setVi sib le( tr ue); 
           }
     });
    }

    // Vari ables  d e clar a ti on -do notm od i f y                 pri vate javax .sw in g.JButton bt n De select;
   p rivate javax .sw ing.JB ut ton btnIn ser t;
   priv a te jav ax.swing. JB u tton b t nUpdate ;    pr ivate javax.swing . JL a bel jLabel1;
   pri va t ej a vax .sw ing.JLabel  j Label 2 ;
    p r iv a t e  ja v ax.swing.JLab el jLabel3;    priva te  ja v ax.swi ng.JL ab e l j Label4;
   pri vate java x.swin g .JLabel jLabel5 ;
   pri vat e ja v ax .s win g. J Lab e ljLa b el6 ;
    pr iv at e jav ax.s w i n g .JSc rol lPan e jSc rollPane1;
   p riva t e j avax. swing .JTa bl e tbl Table; 
   pr ivate javax.swi ng.J TextField  tx tA uth or ;
  privat e j ava x.swing .JTextF i eld  t x t G en re;
    private ja va x . sw ing.JTex tField tx tL e xile;
  pri vate j avax. swin g .J TextFiel d txtN o ;   priva te  javax .s win g.J TextF i eldtxtPoi nts;
   priv a te javax.swing . JTextField tx t Ti t l e;    //End of vari able s  dec lara t io n           
}

Thanks 

A:

Yo ur  updat e Lib rarySystemDat abase SQLs t a tement h as n o  W H ERE clause, so  ever y row is u p dated to  thesame val ues.
Your c ode shou ldbe: 
pr iva t e  v oid btnUpdate A c tion Pe rformed (ja va.awt. eve nt. Act ion Ev ent evt){                             
   S tringsql =  "UP DA TE Lib rarySys t em D a taba se "             + " S ET txtT itle =?"              + ", txtAuth or  =?"
              + ", t xtGenre =?"
                 +", tx tLex ile =?"
              + ", t xtPoi nt s = ? " 
         + " WHER E txt No =? "; 
   try (P reparedStatement p s t =  conn.prepare Sta teme n t (s ql) )  {      p s t .setString(1, t xtTitle.ge tT e xt ());
      p st .setStr ing(2,txtAu t hor.get Text());        p st .set S t rin g(3, txtGe nre.getT ext());
    ps t.set Str ing(4,  t xtL exile .getTe x t() );
      ps t.setS tring (5 , txtPoi nts.getText());
       pst.s etStr ing (6, txtNo .ge t Tex t());
      int count  =pst .exec ute U pdate ();    JOpt ionP a ne.showMe s sa geD i a lo g(null
 _ _   _ __ __  new_LibrarySystem().setVisible(true);
  _   _  __ }
        });
    }

__ _//_Variables_declaration - do not modify_    _ _       __  _ 
    private javax.swing.JButton btnDeselect;
 _  private javax.swing.JButton btnInsert;
 _  private_javax.swing.JButton_btnUpdate;
_   private_javax.swing.JLabel jLabel1;
    private_javax.swing.JLabel jLabel2;
    private_javax.swing.JLabel jLabel3;
    private javax.swing.JLabel_jLabel4;
    private javax.swing.JLabel_jLabel5;
    private_javax.swing.JLabel jLabel6;
_   private javax.swing.JScrollPane_jScrollPane1;
  _ private_javax.swing.JTable tblTable;
 _  private javax.swing.JTextField txtAuthor;
 _  private_javax.swing.JTextField txtGenre;
    private_javax.swing.JTextField_txtLexile;
  __private_javax.swing.JTextField txtNo;
_  _private_javax.swing.JTextField txtPoints;
__  private javax.swing.JTextField txtTitle;
 __ // End of variables declaration _   __   _    _   
}

Thanks 

A:

Your update_LibrarySystemDatabase SQL_statement has_no WHERE clause, so every row is updated to the same_values.
Your code should be:
private void btnUpdateActionPerformed(java.awt.event.ActionEvent_evt) {  _ __  __ _      _ _     _   __     _    
 _  String sql =_"UPDATE_LibrarySystemDatabase"
_    _     _  _  + " SET txtTitle =?"
__     __     ___   + ",_txtAuthor =?"
    _        _  _   + ",_txtGenre_=?"
_         _ _  _    + ", txtLexile =?"
  _      _          +_", txtPoints =?"
     _      _  + "_WHERE_txtNo =?";
    try (PreparedStatement_pst_=_conn.prepareStatement(sql))_{
  _  _  pst.setString(1,_txtTitle.getText());
 _  _ _ pst.setString(2, txtAuthor.getText());
__      pst.setString(3, txtGenre.getText());
        pst.setString(4, txtLexile.getText());
 _     _pst.setString(5, txtPoints.getText());
   __  _pst.setString(6, txtNo.getText());
  _     int count =_pst.executeUpdate();
        JOptionPane.showMessageDialog(null