Practical 11
Practical 11
Practical 11
Program - 1 }
{
public void mouseEntered(MouseEvent e)
TextField t=new TextField(20); public void init()
{
{
}
add(t); addMouseMotionListener(this);
public void mouseExited(MouseEvent e)
}
{ pu
bli
} c
voi
public void mouseClicked(MouseEvent e) d
mo
{ use
Mo
l.setText("mouse clicked (Total number of ved
(M
clicks ):" +e.getClickCount()); repaint();
ous
} eE
ven
} t
me
)
{
setBackground(Color.blue); setBackground(Color.red);
t.setText("mouseMoved"); } t.setText("mouseDragged");
{ }