Question: 13) Wnte a program to draw a top view of24 soda canthat is, draw 24 circles. x 6 grid like this arranged in 4 Here
13) Wnte a program to draw a top view of24 soda canthat is, draw 24 circles. x 6 grid like this arranged in 4 Here is a partially completed program that you can use as a framework for this graphics lab. Add your drawing code to the draw method below. import Java awt Graphics import Javax.swing.JFramea inport Javax.swing. JComponenti public class SodaCanRunner public static void draw (Graphics g) // Your code goes here public static void main (StringlJ args) final int FRAME WIDTH 400; final int FRAME HEIGHT -400; frame.setsize (FRAME WIDTH, FRAME HEIGHT) frame.setDefaultcloseoperation (JFrame.EXIT ON CLOSE) JComponent component new JComponent public void paintComponent (Graphics graph) draw (graph) l: frame.add (component); frame.setVisible (true) To generate random numbers, YOU construct ou l
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
