What Is java gui ?
GUI stands for Graphical User Interface, a term used not only in Java but in all programming languages that support the development of GUIs. A program’s graphical user interface presents an easy-to-use visual display to the user.
I think it will be very useful to learner. Any student can easily use this code and make his/her project completely.
To get help you can see the video.
Source code for signup.
try {
if (jTextField1.getText().equals("") || jTextField2.getText().equals("") || jPasswordField1.getText().equals("")) {
JOptionPane.showMessageDialog(null, "Fields Must Not be Empty...");
} else {
String sql = "select email from admin where email=? ";
pst = con.prepareStatement(sql);
pst.setString(1, jTextField3.getText());
rs = pst.executeQuery();
if (rs.next()) {
JOptionPane.showMessageDialog(null, jTextField3.getText() + " Email Exist...");
} else {
String sql2 = "insert into admin(name,username,password,email,cell,country) values(?,?,?,?,?,?)";
pst = con.prepareStatement(sql2);
pst.setString(1, jTextField1.getText());
pst.setString(2, jTextField2.getText());
pst.setString(3, jPasswordField1.getText());
pst.setString(4, jTextField3.getText());
pst.setString(5, jTextField4.getText());
pst.setString(6, (String) jComboBox1.getSelectedItem());
pst.execute();
JOptionPane.showMessageDialog(null, "Inserted...!!!");
}
}
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
Be First to Comment