Question
15-2. JAVA Write a frame that will draw random colored (from an array of Color objects): a. random thick lines - use Line2D objects with
15-2. JAVA Write a frame that will draw random colored (from an array of Color objects): a. random thick lines - use Line2D objects with rounded edges. Set it up like a horizontal bar chart with a series of lines going from left to right. The x coordinate will be starting from the left edge, the y coordinate will increment a set amount, and the width and height will be random numbers (but keep the height of each bar on the chart (not higher than the y's increment) and the width on the frame (you can getSize().width for your frame's width). Use a for loop to loop through all the drawn lines with the loop variable being the y coordinate that will increment the lines vertically.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started