MouseListener ml = new MyMouseListener(this);
MouseMotionListener mml = new MyMouseMotionListener(this);
// Tell this component what MouseListener and MouseMotionListener
// objects to notify when mouse and mouse motion events occur.
this.addMouseListener(ml);
this.addMouseMotionListener(mml);