Alternatively referred to as a sign in, a login or logon is a set of credentials used to gain access to an area that requires proper authorization. Logins are used to gain access to and control of computer networks, and bulletin boards, as well as other services and devices. Today, most logins consist of both a username and password.
To get help you can see the video.
Source code for login page.
String sql = "select * from login where username=? and password=?";
try{
pst = con.prepareStatement(sql);
pst.setString(1, jTextField_user.getText());
pst.setString(2, jPasswordField.getText());
rs = pst.executeQuery();
if(rs.next()){
//JOptionPane.showMessageDialog(null, "Right...");
new AfterLogin().setVisible(true);
dispose();
}else{
//JOptionPane.showMessageDialog(null, "Wrong...");
new Confremation_1().setVisible(true);
}
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
Interface of after run the login page.
Custom confirmation message.
Be First to Comment