title: How to compare data enter from jTextfield with Mongo database data through Java driver?
body: <p>Since i want to Compare the userId and password enter by the user in jTextFields  with the value of userid and password  present in my document  of mongodb,document in Mongodb is like this:</p>
  
  <pre><code>{ "_id" : ObjectId("500ee83ca5d4c30481aa2a13"),
   "User ID" : 10, 
   "Password" : "4554gf",}
  </code></pre>
  
  <p>Below code is on my <code>Login</code> button</p>
  
  <pre><code>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
      int s1 = Integer.parseInt(jTextField1.getText()); //number entering in jtextfield 
      String s2 = jPasswordField1.getText(); //password enter by user  
      if(s1== UserId  &amp;&amp;  s2==password) {
          this.dispose();//this will dispose the login gui
          a.setVisible(true);//this will visible the nxt gui
      }
      else {
          asd.setText("invalid user"); // label that shows if userid and dont match
      }
  </code></pre>
  
  <p>So its not working , so please tell how to do it ? i Hope you all understand my question</p>