rich_applet_10/ 0000755 0001750 0000144 00000000000 10323213014 012340 5 ustar pat users rich_applet_10/test1.java 0000644 0001750 0000144 00000001745 10323211330 014251 0 ustar pat users import java.applet.Applet; import java.awt.event.*; import java.awt.*; /*Applet 10 is similar to Applets 8 and 9, except that one moves a pentagon around rather than a square. Accordingly the class PolyFlip replaces the class Checker. PolyFlip is considerably more general than what we use here. This applet is a warmup for the more involved Applets 12-14. Applet 14 gives more methods for PolyFlip and uses its full generality. The ListenTriangle class is slightly different than it was in the earlier applets.*/ public class test1 extends Applet { PlayingBoard board1; TextCanvas board2; int SIZE=10; public void init() { setBackground(Color.blue); board1=new PlayingBoard(SIZE); board1.resize(40*SIZE,40*SIZE); board2=new TextCanvas(); board1.setBackground(Color.black); board2.setBackground(Color.blue); board2.resize(40*SIZE,5*SIZE); add(board1); add(board2); } } rich_applet_10/TextCanvas.java 0000644 0001750 0000144 00000000663 10323207621 015277 0 ustar pat users import java.awt.*; class TextCanvas extends Canvas { Canvas C; TextCanvas() { this.C=C; } public void paint(Graphics g) { g.setFont(new Font("Helvetica",Font.PLAIN,25)); g.setColor(Color.green); g.drawString("Rich: Applet 10",5,25); g.setFont(new Font("Helvetica",Font.PLAIN,15)); g.setColor(Color.white); g.drawString("Click on the pentagon to move it.",190,20); } } rich_applet_10/test1.html 0000644 0001750 0000144 00000000355 10323211352 014274 0 ustar pat users