import java.awt.*; public class neljas extends Canvas{ protected Color x=Color.red, y=Color.white, z=Color.white; public void varvid(Color x1, Color y1, Color z1){ x=x1; y=y1; z=z1; repaint(); } public void paint(Graphics g){ g.fillRect(20,20, 65,150); g.setColor(x); g.fillOval(35,30,30,30); g.setColor(y); g.fillOval(35,80,30,30); g.setColor(z); g.fillOval(35,130,30,30); } }