import java.awt.*; import java.awt.event.*; public class koduneL extends Frame{ int x[]=new int[50]; int y[]=new int[50]; int r[]=new int[50]; int b[]=new int[50]; int gr[]=new int[50]; int rarv=0; int i; int j; int red=100; int green=100; int blue=100; public koduneL(){ setTitle("Ringid"); setSize(400, 400); setLocation(300, 100); setBackground(Color.blue); addMouseListener(new HiireKuular()); setVisible(true); } public void paint(Graphics g){ for(int k=0; kx[k]-30/2) &&(iy[k]-30/2) &&(j<(y[k]+30/2))){ red=(int)(Math.random()*256); blue=(int)(Math.random()*256); green=(int)(Math.random()*256); g.setColor(new Color(red,green,blue)); g.fillOval(x[k]-30/2, y[k]-30/2, 30, 30); r[k]=255; b[k]=0; gr[k]=0; lisa= false; } } } if(lisa==true){ System.out.println("uus täpp"); for(int k=0; k