Friday, October 26, 2012

Code used in video "Java prog#24.confermation to detele data (Do you really want to delete ) in NetBeans java GUI"

11:03 AM

Here I am providing the downloadable code link of  the java code I have used in the video
 "Java prog#24. confirmation to delete data (Do you really want to delete ) in NetBeans java GUI"  of my YouTube channel ProgrammingKnowledge

Click Link to watch the video LINK

This code below is for the cmd_deleteActionPerformed method action perform



 private void cmd_deleteActionPerformed(java.awt.event.ActionEvent evt) {                                           
        int p = JOptionPane.showConfirmDialog(null,"Do you really want to delete","Delete",JOptionPane.YES_NO_OPTION );
       if(p==0){
        String sql="delete from Empoyeeinfo where Empoyeeid =?";
        try{
        
            pst=conn.prepareStatement(sql);
            
            pst.setString(1, txt_Empoyeeid.getText());
            
            pst.execute();
            JOptionPane.showMessageDialog(null, "Deleted");
        
        }catch(Exception e){
        
         JOptionPane.showMessageDialog(null, e);
        
        }
        Update_table();
       }
    }   

Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top