Question
For Java: Write a GUI application that allows the user by using JSlider class to gather the value of radius (radius is 15, by default)
For Java: Write a GUI application that allows the user by using JSlider class to gather the value of radius (radius is 15, by default) to draw a solid (Light Gray, at the default) color of circle as well as display all information about the circle with black color.
Need to include:
? (2 pts) title bar: Using slider to draw a solid circle (Fig 1)
? (10 pts) Change Color button at the top of the control Panel
o event handler for showing JColorChooser pre-defined dialog (Fig 2)
o if the user chooses the different color from the dialog, then the shape will automatically update that color
o if the user did not choose any color or press Cancel button, the color will be set back to Light Gray
o the textarea informations textcolor also be changed by that color (by default, the text color is black)
? (5 pts) Radius data: The radius value will be changed by the object of JSlider (the number between 0 to 255, set up the default value to 15, the mark label by 50)
? (10 pts) If the user changes the sliders radius value, the circle also be changed by that radius as well as the information at the text area.
? (3 pts) Display the circles area and circumference with two decimal places.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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