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

javax.swing.JLayer.remove/All() should mention that it could be used to erase glasspane or/and view

XMLWordPrintable

      Method javax.swing.JLayer.remove(Component comp) overrides method in java.awt.Container and inherits its specification.

      However it's behavior is tuned a little:

          public void remove(Component comp) {
              if (comp == getView()) {
                  setView(null);
              } else if (comp == getGlassPane()) {
                  setGlassPane(null);
              } else {
                  super.remove(comp);
              }
          }

      This logic migth deserve to be specified.

      Also, the same applies to :

          /**
           * {@inheritDoc}
           */
          public void removeAll() {
              setView(null);
              setGlassPane(null);
          }
      The following JCK tests verify this behavior:
      api/javax_swing/JLayer/index.html#General[remove_view]
      api/javax_swing/JLayer/index.html#General[remove_glassPane]
      api/javax_swing/JLayer/index.html#General[removeAll]

            Unassigned Unassigned
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: