import java.awt.*;
import java.applet.*;
import java.awt.event.*;
/*<
applet code="demo13" width=300 height=200>
</applet>
*/
class Lines extends Applet implements MouseListener{
int mousex=0,mousey=0,movx=0,movy=0;
public void init(){
addMouseListener(this);
}
public void mouseExited(MouseEvent me){
}
public void mouseEntered(MouseEvent me){
}
public void mouseClicked(MouseEvent me){
}
public void mousePressed(MouseEvent me){
mousex=me.getX();
mousey=me.getY();
repaint();
}
public void mouseReleased(MouseEvent me){
movx=me.getX();
movy=me.getY();
repaint();
}
public void paint(Graphics g){
g.drawLine(mousex,mousey,movx,movy);
}
}