Say we execute the following method.
The fillRect() method draws a filled rectangle.
It takes four integer parameters: the left side's
x-coordinate, the
top side's y-coordinate, the width, and the height.
import csbsju.cs160.*;
public class Q1A {
public static void run() {
DrawableFrame w;
w = new DrawableFrame();
w.show();
Graphics g = w.getGraphics();
g.fillRect(50, 50, 100, 100);
g.setColor(Color.white);
g.fillRect(75, 0, 50, 200);
g.fillRect(0, 75, 200, 50);
}
}
Complete the below window as it will appear on the screen.