import java.applet.Applet; import java.awt.Graphics; import java.awt.Graphics2D; import javax.swing.JOptionPane; /** An applet that draws a checkerboard of two colors -- one chosen by the user and one that is the complement of the first color. */ public class A7CheckerboardApplet extends Applet { A7Checkerboard board; public A7CheckerboardApplet() { board = new A7Checkerboard(20,40,250); } public void paint(Graphics g) { // recover Graphics2D Graphics2D g2 = (Graphics2D)g; // construct a checkerboard and draw it board.draw(g2); } }