ui/src/main/java/ucar/util/prefs/ui/PrefPanel.java
public boolean accept() {
    StringBuffer buff = new StringBuffer("Invalid field value ");
    boolean ok = true;
    for (Object o : flds.values())
      ok &= ((Field) o).accept(buff);

    if (!ok) {
      try { JOptionPane.showMessageDialog(PrefPanel.findActiveFrame(), buff.toString()); }
      catch (HeadlessException e) { }
      return false;
    }

    /* store the text widths if they exist
    if (storeData != null) {
      Preferences substore = prefs.node("sizes");
      iter = flds.values().iterator();
      while (iter.hasNext()) {
        Field fld = (Field) iter.next();
        JComponent comp = fld.getEditComponent();
        substore.putInt(fld.getName(), (int) comp.getPreferredSize().getWidth());
      }
    } */
    fireEvent(new ActionEvent(this, 0, "Accept"));
    return true;
  }
public boolean accept() {
    StringBuffer buff = new StringBuffer("Invalid field value ");
    boolean ok = true;
    for (Object o : flds.values())
      ok &= ((Field) o).accept(buff);

    if (!ok) {
      try { JOptionPane.showMessageDialog(PrefPanel.findActiveFrame(), buff.toString()); }
      catch (HeadlessException e) { }
      return false;
    }

    /* store the text widths if they exist
    if (storeData != null) {
      Preferences substore = prefs.node("sizes");
      iter = flds.values().iterator();
      while (iter.hasNext()) {
        Field fld = (Field) iter.next();
        JComponent comp = fld.getEditComponent();
        substore.putInt(fld.getName(), (int) comp.getPreferredSize().getWidth());
      }
    } */
    fireEvent(new ActionEvent(this, 0, "Accept"));
    return true;
  }
Call Field.accept() on all Fields. This puts any edits into the Store,
and fires PropertyChangeEvents if any values change, and sends an
ActionEvent to any listeners.