import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class HiirPall1 extends Applet implements MouseListener{ Image pilt=Toolkit.getDefaultToolkit().getImage("juku.gif"); public HiirPall1(){ addMouseListener(this); } public void mousePressed(MouseEvent e){ Graphics g=this.getGraphics(); int samm=0; for(int x=e.getX(), y=e.getY(); y<200; y=y+samm){ g.drawImage(pilt, x, y, this); try{Thread.sleep(100);}catch(Exception erind){} g.setColor(Color.white); g.fillRect(x, y, 30, 56); samm++; } } 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 HiirPall1()); f.setSize(200, 200); f.setVisible(true); } }