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

AccessibleJTable cannot be subclassed (API change)

XMLWordPrintable



      Name: md23716 Date: 07/24/2001

      Developers are trying to subclass tables and still allow accessiblity. Sublclassing the JTable works fine, but when they try to subclass the AccessibleJTable class along with it, they can't because the constructor for AccessibleJTable cannot be called from another package.

      The constructor for AccessibleJTable is missing any visibility modifier (private, protected, public) and therefore gets the default, package. This means that AccessibleJTable cannot be subclassed outside of its package, and therefore the user cannot subclass AccessibleJTable nor modify or add to any of the associated accessibility methods when subclassing JTable.

      All the other classes inheriting from AccessibleJComponent (except for AccessibleJMenuItem) have either public or protected visibility. Since the constructor for AccessibleJTable is missing a visibility modifier it is possible that this is an error and that the visibility was not intentionally meant to be limited to package.
      ======================================================================

            lmonsantsunw Lynn Monsanto (Inactive)
            mdevereuorcl Michelle Devereux (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: