To help you see what the JSlider methods do, add a println statement in the listener method and print out the values that the JSlider class methods return as you move the slider around.
Type: Posts; User: Norm
To help you see what the JSlider methods do, add a println statement in the listener method and print out the values that the JSlider class methods return as you move the slider around.
Make radius final and you won't be able to change it.
Your code is not using any values from the slider to change the x & y values of the shape's location.
Look at the JSlider class's API doc for...
Does the size of the drawn shape change?
Where do you change the value of the x and y position of the shape? Is its position supposed to change when a slider is moved?
What is the setD method supposed to do? Why does it change the value of radius? Do you know what a circle's radius is?
If you want the sliders to control the position of the shape, then you need...
If you want the size of the shape not to change, try defining the radius as final and remove all code that tries to change its value . Only change the x and y position values.
BTW The code you...