
/*
    The RandomStrings applet on which this applet is based shows
    randomly colored and positioned copies of a message in several
    randomly chosen fonts.  This applet extends that one so
    that when the user clicks on the applet, it is redrawn
    (with new random choices).
*/

import java.awt.*;
import java.awt.event.*;

public class ClickableRandomStrings extends RandomStrings 
                                        implements MouseListener {

   public void init() {
          // When the applet is created, do the initialization
          // of the superclass, RandomStrings.  Then set this
          // applet to listen for mouse events on itself.
      super.init();
      addMouseListener(this);
   }

   public void mousePressed(MouseEvent evt) {
          // When user presses the mouse, tell the system to
          // call the applet's paint() method.
      repaint();
   }
   
   public void mouseEntered(MouseEvent evt) { }    // These empty routines
   public void mouseExited(MouseEvent evt) { }     //    are required by the
   public void mouseClicked(MouseEvent evt) { }    //    MouseListener interface.
   public void mouseReleased(MouseEvent evt) { }

}  // end class ClickableRandomStrings
