Graphic Java

ASSIGNMENT:
The constructor for instance of the Color class is new Color(int, int, int). This applet is composed of four grid areas. Here is the code for one grid area. for(int x=0; x<11; x++){ for(int y=0; y<11; y++){ g.setColor(new Color(25*x, 25*y, 0)); g.fillOval(150-x*10, 150-y*10, 9, 9); } } The point (150,150) is the center. You will notice that the fillOval method uses these points as starting points in this example. You will also notice that in both cases x*10 and y*10 are SUBSTRACTED from these starting vaules. So this code takes care of the (-,-) quadrant. A slight alteration will take care of the (-,+), (+,+), and (+,-) quadrants.

Then there's the matter of color. This quadrant displays the color values (0,0,0) to (250,250,0). You need to make the other quadrants display color values from (0,0,0) to (250,0,250), (0,0,0) to (0,250,250), and (0,0,0) to (250,250,250).