Question: So far this is the code I have written, I cant seem to get the inner for loop correct. It iterates 30 times but the

 So far this is the code I have written, I cant

So far this is the code I have written, I cant seem to get the inner for loop correct. It iterates 30 times but the arguments in the g.drawRect statement are incorrect.

seem to get the inner for loop correct. It iterates 30 times

Problem 3. Write Java class Squares. When executed, it should open a window and draw 30 squares in the pattern below. import java.awt.*; import javax.swing.JFrame; class Squares extends JFrame{ public static void main(String[] args) { Squares d = new Squares(); d.setSize(1000, 1000); d.setVisible(true); } public void paint(Graphics g) { for (int k=0; k

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!