import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*
<applet code="MouseListenersStatusBar" width=300 height=100>
</applet>
*/
public class MouseListenersStatusBar extends Applet implements MouseListener
{
public void init()
{
addMouseListener(this);
}
// Handle mouse clicked.
public void mouseClicked(MouseEvent me)
{
showStatus("Mouse clicked.");
repaint();
}
// Handle mouse entered.
public void mouseEntered(MouseEvent me)
{
showStatus("Mouse entered.");
repaint();
}
// Handle mouse exited.
public void mouseExited(MouseEvent me)
{
showStatus("Mouse exited.");
repaint();
}
// Handle button pressed.
public void mousePressed(MouseEvent me)
{
showStatus("Mouse down.");
repaint();
}
// Handle button released.
public void mouseReleased(MouseEvent me)
{
showStatus("Mouse Up.");
repaint();
}
}