| Repaints the overlayable component associated with component.
Because the overlay component is shown above the component and its child components,
if any of the components repaint, the overlay component will be coverred if the overlay component
doesn't know to repaint immediately.
Due to way Swing repaintManager works, there isn't any other better way
to solve the issue other than the component has code to trigger the repaint
of the overlay component. That's one reason we provide this way to repaint the overlay component easily.
See below for an example of how to prepare the component to be ready for the overlayable.
public OverlayTextField() {
...
public void repaint(long tm, int x, int y, int width, int height) {
super.repaint(tm, x, y, width, height);
OverlayableUtils.repaintOverlayable(this);
}
Parameters: component - the component that has an overyable. |