public void paint(Graphics paramGraphics)
  {
    nullCheck();
    Graphics localGraphics = this.dblbuffer.getGraphics();
    int i = getSize().width / 50;
    int j = getSize().height / 50;

    Map localMap = this.mapref.getMap();

    for (int k = 0; k < localMap.getSize().width; k++)
    {
      for (int m = 0; m < localMap.getSize().height; m++)
      {
        if (this.mapref.getObjectAt(k, m) != null)
        {
          localGraphics.setColor(new Color(255, 255, 0));
          localGraphics.fillRect(k * i, m * j, i, j);
        }
        else
        {
          Object localObject = localMap.getCell(k, m).getAppearance();
          if (this.cache.containsKey(localObject)) {
            localObject = (Image)this.cache.get(localObject);
          }
          else {
            Image localImage = ((Image)localObject).getScaledInstance(i, j, 2);
            this.cache.put(localObject, localImage);
            localObject = localImage;
          }
          localGraphics.drawImage((Image)localObject, k * i, m * j, null);
        }
      }
    }
    localGraphics.setColor(new Color(255, 255, 255));

    localGraphics.drawRect(this.scrollpos.x * i, this.scrollpos.y * j, 
      this.screenSize.width / getSize().width, 
      this.screenSize.height / getSize().height);
    paramGraphics.drawImage(this.dblbuffer, 0, 0, null);
    localGraphics.dispose();
  }