I never thought before, only I used the method getPassword that returning an array of characters and I had seen the getText method was deprecated. But now that I think, why this method was deprecated?.
The Java documentation explains:
Deprecated. As of Java 2 platform v1.2, replaced by
getPassword.Fetches a portion of the text represented by the component. Returns an empty string if length is 0.
For security reasons, this method is deprecated. Use the
getPasswordmethod instead.
But what are those security reasons? Any ideas about this?
Thank you in advance.