Possible Duplicate:
How to check if JPassword field is null
While creating a login registration form, I am using two password fields. Before saving the data, I want to compare both fields; and if they match, then the data should be saved in file. If not it should open a dialog box. Please can anyone help me.