Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {Class.forName("java.sql.DriverManager");
- Connection con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/bleh","root","root");
- Statement stmt=con.createStatement();
- String qry="select * from admin;";
- ResultSet rs=stmt.executeQuery(qry);
- int i=0;
- while(rs.next())
- {
- i++;
- }
- if(i==0)
- {
- this.setVisible(false);
- new start().setVisible(true);
- }
- else if(i>0)
- {
- this.setVisible(false);
- new login().setVisible(true);
- }
- }
- catch(Exception e)
- {
- JOptionPane.showMessageDialog(null,e.getMessage());
- e.printStackTrace();
- }
- {
- }
Add Comment
Please, Sign In to add comment