Graphic Java

ASSIGNMENT:
Create this mosiac pattern using an array of numbers to represent the color of each dot and an array of Color. If you set up these arrays correctly the code below will work in your paint method.

public void paint(Graphics g){ for(int x=0; x<d.length; x++){ g.setColor(c[d[x]]); g.fillOval(10*(x%20), 10*(x/20), 8,8); } }