import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class punkt extends Applet implements MouseListener{ int x=100; int y=100; public punkt(){ addMouseListener(this); } public void paint(Graphics g){ g.drawLine(x, y, x-15, y-15); g.drawLine(x-15, y, x, y-15); } public void mousePressed(MouseEvent e){ x=e.getX(); y=e.getY(); repaint(); } public void mouseReleased(MouseEvent e){} public void mouseClicked(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseExited(MouseEvent e){} public static void main(String[] argumendid){ Frame f=new Frame(); f.add(new punkt()); f.setSize(200, 200); f.setVisible(true); } }