//Andrus Epkin, Marge Nurme, Mait Kelindeman, Tarvo Tromp import java.awt.*; import java.awt.event.*; public class juku extends Frame implements MouseListener{ int x,y; int x1=125; int x2=125; public juku(){ setTitle("juku"); setSize(250,500); //suurus setVisible(true); //teeb nähtavaks addMouseListener(this); //hiirekuular freimile kylge } public void paint(Graphics g){ g.setColor(Color.black); g.drawOval(85,100,80,80); //pea g.fillOval(115,120,20,10); //silm g.drawOval(115,120,20,20); //silm g.drawLine(125,180,125,320); //kehakriips g.drawLine(60,200,190,200); //käsa g.drawLine(125,320,80,380); //vasakjalg g.drawLine(125,320,170,380); //paremjalg g.setColor(Color.red); g.drawLine(125,150,x2,150); //suu 1 pool g.drawLine(x1,150,125,150); // suu 2. pool //g.fillOval(25,45,17,12); //g.setColor(Color.blue); } public void mouseReleased(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseExited(MouseEvent e){} public void mouseClicked(MouseEvent e){} public void mousePressed(MouseEvent e){ x=e.getX(); y=e.getY(); if(y>140 && y<160){ if(x>90 && x<125){ x2=x; /* }else{ x2=125;*/ } if(x>125 && x<165){ x1=x; } } repaint(); } public static void main(String argumendid[]){ new juku(); } }