Question: Can someone please manipulate this code so that it yields a unique image. import java.util. * ; import javax.swing. * ; public class drawingBoard 3
Can someone please manipulate this code so that it yields a unique image.
import java.util.;
import javax.swing.;
public class drawingBoard extends JPanel
int strokeWeight ;
public void paintComponentGraphics g
this.setBackgroundColorwhite;
this.drawDesignTriangleg;
this.drawDesignCircleg;
this.drawDesignCircleg;
public void drawDesignTriangleGraphics g int xCenter, int yCenter, int halfWidth,int degrees
GraphicsD gGraphicsDg;
gsetStrokenew BasicStrokestrokeWeight;
int angle ;
int angleIncr ;
int greenVal ;create new color
int blueVal ;create new color
int redVal ;create new color
int maxVal ;
whileangle maxVal
greenVal ;
public void drawDesignCircleGraphics g int xCenter, int yCenter, int radiushow far from center shape will befor spiral radius decreases through loop
int angle, int maxAngleprogression of drawing shapes overlapping each other
int angleIncrement ;amount of the angular position change
int size ;width of the circleit
int radiusIncr ;
int sizeIncr ;
int greenVal ;create new color
int blueVal ;create new color
int redVal ;create new color
int maxVal ;
GraphicsD gGraphicsDg;
gsetStrokenew BasicStrokestrokeWeight;
whileangle maxAngle
Color myColor new ColorredVal greenVal, blueVal;
gsetColormyColor;
int x xCenter intradius MathcosMathtoRadiansangle;
int y yCenter intradius MathsinMathtoRadiansangle;
gdrawOvalxysize,size;
angle angleIncrement;
radius radiusIncr;
size sizeIncr;
redVal;
ifredValmaxVal
redVal ;
public static void mainString args
int winWid ;
int winHie ;
JFrame myFrame new JFrameMy Rotation image";
myFrame.setSizewinWidwinHie;
myFrame.setDefaultCloseOperationJFrameEXITONCLOSE;
myFrame.addnew drawingBoard;
myFrame.setVisibletrue;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
