Applet handle mouse events

ClickReporter.java A simple applet that uses the class to handle mouse events

import java.applet.Applet; import java.awt.*; 
/** Prints a message saying where the user clicks. 
* Uses an external listener. 
*

public class ClickReporter extends Applet { 
      public void init() { 
            setBackground(Color.yellow); 
            addMouseListener(new ClickListener()); 
      } 
}




								

Permanent link to this article: http://bangla.sitestree.com/applet-handle-mouse-events/

Leave a Reply