package pm.util.swing; import javax.swing.ImageIcon; import pm.util.ArrayCycle; public class CycleButton extends HoldButton { protected static final long serialVersionUID = 1L; protected ArrayCycle imageIconCycle; public CycleButton(HoldButtonListener holdButtonListener, ArrayCycle imageIconCycle) { super(holdButtonListener); this.imageIconCycle = imageIconCycle; cycle(); } public void cycle() { setIcon(imageIconCycle.current()); imageIconCycle.next(); } }