I'm trying to figure something out about JLayeredPane in Swing. If anyone has used this class, feedback would be appreciated.
The documentation for getLayer(JComponent c) states:
Gets the layer property for a JComponent, it does not cause any side effects like setLayer(). (painting, add/remove, etc) Normally you should use the instance method getLayer().
Clearly, there is some mistake here since this is the instance method getLayer() (there aren't overloaded versions)
Is there actually a different call that should be made here, or was somebody just too eager in copying from putLayer():
Sets the layer property on a JComponent. This method does not cause any side effects like setLayer() (painting, add/remove, etc). Normally you should use the instance method setLayer(), in order to get the desired side-effects (like repainting).