code: public void setVisible(boolean visible) {
          boolean old = isVisible();
          this.visible = visible;
          if (old != visible) setDirty(true); //not the most efficient, but I must do this otherwise a CompoundPainter
                                              //or other aggregate painter won't know that it is now invalid
                                              //there might be a tricky solution but that is a performance optimization
          firePropertyChange("visible", old, isVisible());
      }
docs: <p>Sets the visible property. This controls if the painter should
  paint itself. It is true by default. Setting visible to false
  is good when you want to temporarily turn off a painter. An example
  of this is a painter that you only use when a button is highlighted.</p>
  
  @param visible New value of visible property.