-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
7
-
generic
-
generic
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]
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]