import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class B01 extends JFrame {
    public B01()
    {
        addMouseListener( new MouseClickHandler());
        setSize(200,300);
        setVisible(true);
    }
    class MouseClickHandler extends MouseAdapter{
        public void mouseClicked(MouseEvent e)
        {
            setTitle("Mouse Clicked");
        }
        public void mouseReleased(MouseEvent e)
        {
            setTitle("Mouse Released");
        }
    }
    public static void main(String args[])
    {
        B01 bt = new B01();
        bt.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
    }

}