/* IntMonitor.java Track and display an int value. Rich Acuff 28-Sep-97 */ import java.awt.*; public class IntMonitor extends Monitor { Label lab; int val; public IntMonitor (Label l, int v) { lab = l; setValue (v); show(); } public IntMonitor (Label l) { this (l, 0); } public int getValue () { return val; } public void setValue (int v) { val = v; } public void setValue (int v, boolean s) { setValue (v); if (s) show(); } public void incr () { val++; } public void decr () { val--; } public void show () { lab.setText(RichUtil.intToString(val)); } public String toString () { return Integer.toString (val); } }