just change the sentence:
if (jtf1.getText() == jtf2.getText()){}
to :
if (jtf1.getText().equals(jtf2.geText())){}
,everything is ok.
It seems that everything is improving forward one step by step, like my way of learning Java.
So below sentences are all available:
//
JTextField jtf;
JPasswordField jpf;
//
if (jtf.getText().equals(new String(jpf.getPassworldA()))){
}
//The end
we can use this paragraph to testify the name and corresponding password.

No comments:
Post a Comment