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

Specification of JComponent::updateUI should document that the default implementation does nothing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15, 16, 17
    • Fix Version/s: 17
    • Component/s: client-libs
    • Labels:

      Description

      The current state of specification for
      https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/JComponent.html#updateUI()
      is the following
      ===============
      Resets the UI property to a value from the current look and feel. JComponent subclasses must override this method like this:

         public void updateUI() {
            setUI((SliderUI)UIManager.getUI(this);
         }
      ===============

      It's unclear from the spec that the original implementation of the method does nothing. This deserves to be mentioned explicitly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psadhukhan Prasanta Sadhukhan
              Reporter:
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: