import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;

public class Exam2 extends Applet{
  public Exam2(){
    addMouseListener(new HiireKuular());
  }
  class HiireKuular extends MouseAdapter{
    public void mousePressed(MouseEvent e){
      Graphics g=Exam2.this.getGraphics();
      g.drawLine(e.getX()+4, e.getY(), e.getX(), e.getY());
      g.drawLine(e.getX(), e.getY()+4, e.getX(), e.getY());
    }
  }
  public static void main(String argumendid[]){
    Frame f=new Frame("RistjaViletsus!");
    f.setSize(400, 400);
    f.add(new Exam2());
	 f.setBackground(Color.gray);
    f.setVisible(true);

  }

}