<Swing Dev> [12] RFR JDK-8212735:Compilation issue with javax.swing.InputVerifier example in javadoc section
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Tue Oct 23 14:45:22 UTC 2018
Hi All,
In
https://download.java.net/java/early_access/jdk12/docs/api/java.desktop/javax/swing/InputVerifier.htmljavadoc,
the example given does not compile as the "field" variable is not declared.
Following fix ensures proper variable is used. Checked the example works
after this.
--- a/src/java.desktop/share/classes/javax/swing/InputVerifier.java Tue
Sep 18 18:32:03 2018 -0700
+++ b/src/java.desktop/share/classes/javax/swing/InputVerifier.java Tue
Oct 23 20:11:19 2018 +0530
@@ -69,7 +69,7 @@
* getContentPane().add(field1, BorderLayout.NORTH);
* getContentPane().add(field2, BorderLayout.SOUTH);
*
- * field.setInputVerifier(new InputVerifier() {
+ * field1.setInputVerifier(new InputVerifier() {
* public boolean verify(JComponent input) {
* return "pass".equals(((JTextField) input).getText());
* }
Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20181023/6d50ea46/attachment.html>
More information about the swing-dev
mailing list