docs: public void update() {
          FileTextArea textArea = fileWindow.textArea;
          Font font = textArea.getFont();
          setFont(font);
          FontMetrics metrics = getFontMetrics(font);
          int h = metrics.getHeight();
          int lineCount = textArea.getLineCount() + 1;
          String dummy = Integer.toString(lineCount);
          if (dummy.length() < 2) {
              dummy = "99";
          }
          Dimension d = new Dimension();
          d.width = metrics.stringWidth(dummy) + 16;
          d.height = lineCount * h + 100;
          setPreferredSize(d);
          setSize(d);
      }