public static void runWhenChanged(@NotNull Component component, @NotNull String property, @NotNull Runnable runnable) {
    component.addPropertyChangeListener(property, new PropertyChangeListener() {
      @Override
      public void propertyChange(PropertyChangeEvent evt) {
        component.removePropertyChangeListener(property, this);
        runnable.run();
      }
    });
  }
public static void runWhenChanged(@NotNull Component component, @NotNull String property, @NotNull Runnable runnable)