i have some weird problems with javafx PasswordField.this is my code:
public class Form1 implements Initializable {
@FXML private PasswordField pass;
@FXML private PasswordField confpass;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
    // TODO Auto-generated method stub
}
public void btn1_onclick(ActionEvent event){
    String password = pass.getText();
    String conf = confpass.getText();
    if(conf == password)
    {
            System.out.println(":)");
    }
    else
    {
        System.out.println(password + "\t" + conf);
    }
}
}
i type same word in both PasswordField but always the if condition is false and i see two same words in console!!!
how can i fix this?
 
     
    