JPasswordField.getText() deprecated

the method .getText() for a JPasswordField is deprecicated in Java 5.0, my question is, since that way is no longer used, how are you supposed to retrieve what the user types into the program?

Check the Javadoc: http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JPasswordField.html#getText()

-> it says it’s replaced by getPassword(). It was replace due to security reasons.