/******************************* / Spin.java / Written by Timothy M. Bailey / Started: March 31, 1998 / Updated: April 13, 1998 / / Part Wheel of Fortune applet for cs406 class with Dr. Roger Webster / ********************************/ import java.awt.*; import java.applet.*; import java.net.*; public class SpinPanel extends Panel { Image amount, pointer; public SpinPanel(Image fore, Image point) { this.amount = fore; this.pointer = point; } public void destroy() { amount = null; pointer = null; this.repaint(); } public void paint (Graphics g) { this.reshape(140, 425, 123, 110); g.drawImage(pointer, 0, 0, 123, 10, this); g.drawImage(amount, 0, 10, 123, 100, this); this.show(); } public void spin(Image fore) { this.amount = fore; this.repaint(); } }