import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Pildiredaktor1 extends Applet implements MouseListener{ public Pildiredaktor1(){ addMouseListener(this); } public void mousePressed(MouseEvent e){ getGraphics().drawOval(e.getX()-5, e.getY()-5, 10, 10); } 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[] arg){ Frame f=new Frame("Pildiredaktor"); f.add(new Pildiredaktor1()); f.setSize(300, 300); f.setVisible(true); } }