Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. boolean FirstSqaureFilled = true;
  2.         boolean SecondSquareFilled = false;
  3.         int row;
  4.         int col;
  5.         int Xsize = width / XRandom ;
  6.         int Ysize = height / YRandom ;
  7.        
  8.        
  9.         for (row = 0; row < XRandom; row++) {
  10.             for (col = 0; col < YRandom; col++) {
  11.                 int x = Xsize * col;
  12.                 int y = Ysize * row;
  13.                 if (FirstSqaureFilled == true) {
  14.                     g.setColor(fillColor);
  15.                     g.fillRect(x, y, Xsize, Ysize);
  16.                 } else if (SecondSquareFilled == false) {
  17.                     g.setColor(borderColor);
  18.                 }
  19.                 g.fillRect(x, y, Xsize, Ysize);
  20.             }
  21.         }
  22.         drawHandles(g);
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement