I never thought before, only I used the method getPassword that returning an array of characters and I had seen the getText method was depr
getPassword
getText
Try this :
String myPass=String.valueOf(passwordField.getPassword());