public static @Nullable ProgressPanel getProgressPanel(@NotNull JComponent parent) {
    JProgressBar pb = UIUtil.findComponentOfType(parent, JProgressBar.class);
    return pb != null ? (ProgressPanel)pb.getClientProperty(DECORATED_PANEL_PROPERTY) : null;
  }
public static @Nullable ProgressPanel getProgressPanel(@NotNull JComponent parent)