Skip to content

Commit b2e9eb9

Browse files
committed
8268087: Update documentation of the JPasswordField
Reviewed-by: trebari, azvegint, prr
1 parent 91f9adc commit b2e9eb9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/java.desktop/share/classes/javax/swing/JPasswordField.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@
6060
* If an application needs the input methods support, please use the
6161
* inherited method, <code>enableInputMethods(true)</code>.
6262
* <p>
63+
* <strong>Warning:</strong> The {@code JPasswordField} will not show the
64+
* original characters that were typed, instead displaying alternative text or
65+
* graphics. However this doesn't prevent the password from appearing in the
66+
* system memory. For handling confidential information such as the password
67+
* text, refer to the relevant section at
68+
* <a href="https://www.oracle.com/java/technologies/javase/seccodeguide.html">
69+
* Secure Coding Guidelines</a>.
70+
* <p>
6371
* <strong>Warning:</strong> Swing is not thread safe. For more
6472
* information see <a
6573
* href="package-summary.html#threading">Swing's Threading

0 commit comments

Comments
 (0)