Hey;

I have tried too many things to solve it without any results :
comparing a password field ..

Well I know that for example in a JTextField :
JTextField.getText() //not preferable but it returns a string and this is the good side.
But I have tried both of those : (on runtime i fill the password field with "123")
> jLabel1.setText(jTextField1.getText()); //print the "123"
> if(jTextField1.getText() == "123") //FALSE !!
Of course I have tried to put it in a string, and to be sure that the 123 are only '123' without any thing else !

Now I used also to check the getpassword method like that :

char[] pass = jTextField1.getPassword();

and I have tried every thing ! .. char[0] contains 1 , char[1] -> 2 , char[2] -> 3 ... but they r never equals to their values , and when putting them in a string and makinf the if(str=="123") the result is false forever ..

I don't know what is the mistake in this .. it printes them correctly, output them and all , but they r not equal to their equivalent values so what ?

Thanks for answer .