code: private void doPaintComponent(Graphics g)
      {/*
       * if (isOpaque() || isDesignTime()) { g.setColor(getBackground()); g.fillRect(0,0,getWidth(),getHeight()); }
       */
  
          if (isDesignTime())
          {
              // do nothing
          }
          else
          {
              int z = getZoom();
              Rectangle viewportBounds = getViewportBounds();
              drawMapTiles(g, z, viewportBounds);
              drawOverlays(z, g, viewportBounds);
          }
  
          super.paintBorder(g);
      }
docs: the method that does the actual painting