Press "Enter" to skip to content

Search operation using java gui.

Source code of search operation in java gui.

try{
if(jTextField_Email.getText().equals("")){
JOptionPane.showMessageDialog(null, "Please Search With Email..");
}else{
String sql = "select * from user where email = '"+jTextField_Email.getText()+"' ";
pst = con.prepareStatement(sql);
rs = pst.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
}
}catch(SQLException e){

}

Interface of after run the page.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *