public static int showDialog(@NotNull Component parent,
                               @DialogMessage String message,
                               @NotNull @DialogTitle String title,
                               String @NotNull @NlsContexts.Button [] options,
                               int defaultOptionIndex,
                               @Nullable Icon icon) {
    return MessagesService.getInstance().showMessageDialog(null, parent, message, title, options, defaultOptionIndex, -1, icon, null, false,
                                                           null);
  }
public static int showDialog(@NotNull Component parent,
                               @DialogMessage String message,
                               @NotNull @DialogTitle String title,
                               String @NotNull @NlsContexts.Button [] options,
                               int defaultOptionIndex,
                               @Nullable Icon icon)