Skip to content

Commit

Permalink
Merge pull request #2 from Lakmal98/master
Browse files Browse the repository at this point in the history
Login back end v2
  • Loading branch information
PathmikaW authored Sep 25, 2020
2 parents 43312f9 + 3eb3a10 commit 3d13e88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions StudentMgtSystem/src/studentmgtsystem/login.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
ResultSet rs = stmt.executeQuery(sql);

rs.next();
System.out.println(rs.getString(1));
if(Integer.parseInt(rs.getString(1))==1) {

new login().setVisible(true);
this.setVisible(false);
this.dispose();
} else {
JOptionPane.showMessageDialog(null, "Invalid username or password.Try again!");
password.setText("");
Expand Down

0 comments on commit 3d13e88

Please sign in to comment.