import java.awt.*;
import java.awt.event.*;
class MouseEvent1 extend Frame
{
private TextField tf;
public MouseEvent1 (String s)
{
super (s);
this.SetLayout(new FlowLayout());
tf=new TextField(30);
this.add MouseMotionListner(new MouseMotionListner());
add (tf);
}
class MyMouseMotionListner extends MouseMotionAdapter
{
public void main Dragged (MouseEvent e)
{
String s= "Mousedragging="+e.getx()+"y"=+e.gety();
if.setText(s);
}
}
public static void main (String s[])
{
MouseEvent1 c=new MouseEvent1("Testing event....");
c.setSize(200,200);
c.show();
}
}