title: Adding a MouseListener to a panel
body: <p>I am trying to add the mouse actions to my panel. 
  This is what the program is supposed to do:</p>
  
  <blockquote>
    <p>Write a program that allows the user to specify a triangle with three mouse presses. After the first mouse press, draw a small dot. After the second mouse press, draw a line joining the first two points. After the third mouse press, draw the entire triangle. The fourth mouse press erases the old triangle and starts a new one.</p>
  </blockquote>