I am getting 2 errors when I compile this program.
1. Pattern.java:18: illegal start of type
for (int col = 0; col >= 150; col += size)
^
2. Pattern.java:31: <identifier>
}
^
This is the code:
import java.awt.*;
public class Pattern
{
private final int WIDTH = 10;
private int col;
private final int YLOC = col * WIDTH;
for (int col = x1; col >= 150; col += size)
{
boolean which color;
which color = false;
for (int row = y1; r <= 150; r += size)
{
if (which color)
g.fillrect
g.filloval (row, col, size, size, color f1, color b1)
which color false;
else
which color true
}
}
1. Pattern.java:18: illegal start of type
for (int col = 0; col >= 150; col += size)
^
2. Pattern.java:31: <identifier>
}
^
This is the code:
import java.awt.*;
public class Pattern
{
private final int WIDTH = 10;
private int col;
private final int YLOC = col * WIDTH;
for (int col = x1; col >= 150; col += size)
{
boolean which color;
which color = false;
for (int row = y1; r <= 150; r += size)
{
if (which color)
g.fillrect
g.filloval (row, col, size, size, color f1, color b1)
which color false;
else
which color true
}
}