code: public void paint (Graphics g, int x, int y, int width, int height)
      {
          // bail out now if we were passed a bogus source image at construct time
          if (_tiles == null) {
              return;
          }
  
          int rwid = width-2*_w3, rhei = height-2*_h3;
  
          g.drawImage(_tiles[0], x, y, _w3, _h3, null);
          g.drawImage(_tiles[1], x + _w3, y, rwid, _h3, null);
          g.drawImage(_tiles[2], x + _w3 + rwid, y, _w3, _h3, null);
  
          y += _h3;
          g.drawImage(_tiles[3], x, y, _w3, rhei, null);
          g.drawImage(_tiles[4], x + _w3, y, rwid, rhei, null);
          g.drawImage(_tiles[5], x + _w3 + rwid, y, _w3, rhei, null);
  
          y += rhei;
          g.drawImage(_tiles[6], x, y, _w3, _h3, null);
          g.drawImage(_tiles[7], x + _w3, y, rwid, _h3, null);
          g.drawImage(_tiles[8], x + _w3 + rwid, y, _w3, _h3, null);
      }
docs: Fills the requested region with the background defined by our source image.