import java.awt.*; import java.awt.event.*; public class punkt extends Frame implements MouseListener{ public punkt(){ init(); } public void init(){ addMouseListener(this); } public void mousePressed(MouseEvent e){ Graphics g=getGraphics(); g.setColor(Color.red); g.drawLine(e.getX(), e.getY()-10,e.getX(), e.getY()+10); g.drawLine(e.getX()-10, e.getY(),e.getX()+10, e.getY()); } public void mouseReleased(MouseEvent e){} public void mouseExited(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseClicked(MouseEvent e){} public static void main(String argumendid[]){ punkt f= new punkt(); f.setBackground(Color.blue); f.setSize(300, 300); f.setVisible(true); f.addMouseListener(f); } }