Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8212735

Compilation issue with javax.swing.InputVerifier example in javadoc section

XMLWordPrintable

    • b20
    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      The sample code does not compile.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No compilation error
      ACTUAL -
      cannot find symbol
               field.setInputVerifier(new InputVerifier() {
               ^
        symbol: variable field
        location: class VerifierTest
      1 error

      ---------- BEGIN SOURCE ----------
      Example from API
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Solution:
      Rectify line
               field.setInputVerifier(new InputVerifier() {
      to
               field1.setInputVerifier(new InputVerifier() {


            psadhukhan Prasanta Sadhukhan
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: