Source code of delete operation in java gui.
String ID,fName,lName,email,gender,age;
ID = jTextField_id.getText();
fName = jTextField_User.getText();
lName = jTextField_lastName.getText();
email = jTextField_Email.getText();
gender = (String)(jComboBox1.getSelectedItem());
age = jTextField_Age.getText();
try{
String query = "Update user set id='"+ID+"', f_name='"+fName+"', l_name='"+lName+"', email='"+email+"', gender='"+gender+"', age='"+age+"',confermation='"+conferm+"' where id='"+ID+"' ";
pst=con.prepareStatement(query);
pst.execute();
JOptionPane.showMessageDialog(null, "Updated Succesfully...!!!");
showValueInTable();
}catch(HeadlessException | SQLException e){
JOptionPane.showMessageDialog(null, e);
}
Interface of after run the page.
Be First to Comment