private static int calcWidthToFitText(@NotNull JTextField textField, int additionalWidth) {
    return calcWidthToFitText(textField, textField.getText(), additionalWidth);
  }
private static int calcWidthToFitText(@NotNull JTextField textField, int additionalWidth)