docs: public void paint(Graphics g) {
  
          if (g == null) {
              return;
          }
  
          if (sColHead.length == 0) {
              super.paint(g);
  
              return;
          }
  
          if (iWidth <= 0 || iHeight <= 0) {
              return;
          }
  
          g.setColor(SystemColor.control);
          g.fillRect(iWidth, iHeight, iSbWidth, iSbHeight);
  
          if (iImage == null) {
              iImage = createImage(iWidth, iHeight);
              gImage = iImage.getGraphics();
  
              gImage.setFont(fFont);
  
              if (fMetrics == null) {
                  fMetrics = gImage.getFontMetrics();
              }
          }
  
          if (iRowHeight == 0) {
              iRowHeight = getMaxHeight(fMetrics);
  
              for (int i = 0; i < iColCount; i++) {
                  calcAutoWidth(i);
              }
  
              adjustScroll();
          }
  
          gImage.setColor(Color.white);
          gImage.fillRect(0, 0, iWidth, iHeight);
          gImage.setColor(Color.darkGray);
          gImage.drawLine(0, iRowHeight, iWidth, iRowHeight);
  
          int x = -iX;
  
          for (int i = 0; i < iColCount; i++) {
              int w = iColWidth[i];
  
              gImage.setColor(SystemColor.control);
              gImage.fillRect(x + 1, 0, w - 2, iRowHeight);
              gImage.setColor(Color.black);
              gImage.drawString(sColHead[i], x + 2, iRowHeight - 5);
              gImage.setColor(Color.darkGray);
              gImage.drawLine(x + w - 1, 0, x + w - 1, iRowHeight - 1);
              gImage.setColor(Color.white);
              gImage.drawLine(x + w, 0, x + w, iRowHeight - 1);
  
              x += w;
          }
  
          gImage.setColor(SystemColor.control);
          gImage.fillRect(0, 0, 1, iRowHeight);
          gImage.fillRect(x + 1, 0, iWidth - x, iRowHeight);
          gImage.drawLine(0, 0, 0, iRowHeight - 1);
  
          int y = iRowHeight + 1 - iY;
          int j = 0;
  
          while (y < iRowHeight + 1) {
              j++;
  
              y += iRowHeight;
          }
  
          iFirstRow = j;
          y         = iRowHeight + 1;
  
          for (; y < iHeight && j < iRowCount; j++, y += iRowHeight) {
              x = -iX;
  
              for (int i = 0; i < iColCount; i++) {
                  int   w = iColWidth[i];
                  Color b = Color.white,
                        t = Color.black;
  
                  gImage.setColor(b);
                  gImage.fillRect(x, y, w - 1, iRowHeight - 1);
                  gImage.setColor(t);
                  gImage.drawString(getDisplay(i, j), x + 2,
                                    y + iRowHeight - 5);
                  gImage.setColor(Color.lightGray);
                  gImage.drawLine(x + w - 1, y, x + w - 1, y + iRowHeight - 1);
                  gImage.drawLine(x, y + iRowHeight - 1, x + w - 1,
                                  y + iRowHeight - 1);
  
                  x += w;
              }
  
              gImage.setColor(Color.white);
              gImage.fillRect(x, y, iWidth - x, iRowHeight - 1);
          }
  
          g.drawImage(iImage, 0, 0, this);
      }