title: error about java.lang.NullExceptionPoint
body: <p>I am working on my Project in Netbeans entitled Car reservation system. I've encountered an error in my log in form codes. Once I clicked the login button java.lang.NullExceptionPoint error showed up. 
  Any suggestions for my codes? thanks</p>
  
  <p>Here is my code:</p>
  
  <pre><code>private void cmdloginMouseClicked(java.awt.event.MouseEvent evt) {                                      
          // TODO add your handling code here:
          String sql = txtusername.getText() + "'select * from tblelogin where username='" + "' and userpass='" + txtuserpass.getText() + "'";
          try {
              pst = conn.prepareStatement(sql);
              rs = pst.executeQuery();
              if (rs.next()) {
                  JOptionPane.showMessageDialog(null, "Correct");
  
              } else {
                  JOptionPane.showMessageDialog(null, "Invalid username or password");
              }
  
          } catch (Exception e) {
              JOptionPane.showMessageDialog(null, e);
          }
      }        
  </code></pre>