// This appears in Core Web Programming from
// Prentice Hall Publishers, and may be freely used
// or adapted. 1997 Marty Hall, hall@apl.jhu.edu.

/** A Slider that takes an Everest applet as an
 *  argument, calling back to its setCostField when
 *  the slider value changes.
 */

public class CostSlider extends Slider {
  private Everest app;
  
  public CostSlider(int minValue, int maxValue,
                    int initialValue, Everest app) {
    super(minValue, maxValue, initialValue);
    this.app = app;
  }

  public void doAction(int value) {
    app.setCostField(value);
  }
}

