title: Solution for "cannot find symbol" error with mouse events
body: <p>I keep importing more packages but I get the same "error: cannot find symbol" with all of the methods containing mouse events.  I think I am missing a package or a class that needs to be extended or implemented, but I can't find which one.  Any ideas?</p>
  
  <pre><code>import java.awt.event.*;
  import java.awt.BorderLayout;
  import java.awt.Button;
  import java.awt.Component;
  import java.awt.Frame;
  import java.awt.TextArea;
  import java.awt.event.MouseAdapter;
  import java.awt.event.MouseEvent;
  import java.awt.event.MouseListener;
  import java.awt.*;
  
  public class t1 implements MouseListener
  { 
      public static void main(String[] args)
      {
      // Create frame with title
          Frame frame = new Frame("Click Counter Project");
  
          // Create a component to add to the frame
          final TextArea textArea = new TextArea("Click");
      }
      public void mousePressed(MouseEvent event)
      { 
              textArea.setText("Mouse pressed. x = "+ event.getX() + " y = " +         event.getY());
      } 
      public void mouseReleased(MouseEvent event)
      { 
          textArea.setText("Mouse released. x = "+ event.getX() + " y = " + event.getY());
  } 
  public void mouseClicked(MouseEvent event)
  { 
      textArea.setText("Mouse clicked. x = "+ event.getX() + " y = " + event.getY());
      } 
      public void mouseEntered(MouseEvent event)
      { 
          textArea.setText("Mouse entered. x = "+ event.getX() + " y = " + event.getY());
      } 
      public void mouseExited(MouseEvent event)
      { 
              textArea.setText("Mouse exited. x = "+ event.getX() + " y = " + event.getY());
      }
      public void t1()
      {
          frame.add(textArea, BorderLayout.NORTH);
              int width = 300;
              int height = 300;
              frame.setSize(width, height);
              frame.setVisible(true);
      }
  }
  </code></pre>