How to compare data enter from jTextfield with Mongo database data through Java driver?
 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:

    { "_id" : ObjectId("500ee83ca5d4c30481aa2a13"),
     "User ID" : 10, 
     "Password" : "4554gf",}

Below code is on my `Login` button

    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  &&  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
        }


So its not working , so please tell how to do it ? i Hope you all understand my question
How to compare data enter from jTextfield with Mongo database data through Java driver?
===

 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:

    { "_id" : ObjectId("500ee83ca5d4c30481aa2a13"),
     "User ID" : 10, 
     "Password" : "4554gf",}

Below code is on my `Login` button

    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  &&  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
        }


So its not working , so please tell how to do it ? i Hope you all understand my question