title: Mouse entered, mouse exited changing the text on the button on each event
body: <p>I am trying to connect a button to say "Hi" when the mouse enters it and "Bye" when the mouse leaves. I have been using mouse events with a MouseListener but to no avail. </p>
  
  <p>I'm new to Java and this question has been plaguing me for the last 2 days and I just have not been able to figure it out. Any help would be greatly appreciated.</p>
  
  <pre><code>private abstract class HandlerClass implements MouseListener {
  }
  
  private abstract class Handlerclass implements MouseListener {
     @Override
     public void mouseEntered(java.awt.event.MouseEvent e) {
        mousebutton.setText("Hi");
     }
  
     @Override
      public void mouseExited(java.awt.event.MouseEvent e) {
        mousebutton.setText("Bye");
     }
  }                                           
  </code></pre>