ublic void setVisible(boolean aFlag) {
if(aFlag != isVisible()) {
super.setVisible(aFlag);
Container parent = getParent();
if(parent != null) {
Rectangle r = getBounds();
parent.repaint(r.x,r.y,r.width,r.height);
}
// Some (all should) LayoutManagers do not consider components
// that are not visible. As such we need to revalidate when the
// visible bit changes.
revalidate();
}
}