/******************************* / PlayerPanel.java / Written by Timothy M. Bailey / Started: March 31, 1998 / Updated: April 13, 1998 / / Part of Wheel of Fortune applet for cs406 class with Dr. Roger Webster / ********************************/ import java.awt.*; import java.applet.*; import java.net.*; public class PlayerPanel extends Panel { String name, gameMoney, matchMoney; String spinWorth, letterCount; Image guessx, guesso; int count; public PlayerPanel(Image x, Image o, String name) { this.name = new String(name); this.gameMoney = new String("Game = $ 0"); this.matchMoney = new String("Match = $ 0"); this.spinWorth = new String(""); this.letterCount = new String(""); this.guessx = x; this.guesso = o; this.count = 0; } public void paint (Graphics g) { this.reshape(533, 100, 267, 300); g.setColor(Color.blue); g.drawLine(0, 0, 267, 0); g.drawLine(0, 0, 0, 290); g.drawLine(0, 290, 267, 290); // g.drawString("Player Panel", 100, 150); g.setColor(Color.black); g.setFont(new Font("TimesRoman", Font.BOLD, 36)); g.drawString(name, 15, 40); g.setColor(Color.red); g.setFont(new Font("TimesRoman", Font.BOLD, 18)); g.drawString(gameMoney, 50, 100); g.setColor(Color.yellow); g.drawString(matchMoney, 50, 150); g.setColor(Color.cyan); g.setFont(new Font("TimesRoman", Font.BOLD, 16)); g.drawString(spinWorth, 25, 225); g.setColor(Color.lightGray); g.drawString(letterCount, 25, 250); for (int i=0; i 5) { System.out.println("count error"); count = 5; } repaint(); return count; } void resetGuess() { count = 0; } }