Can someone show me code that will set up a JSlider except, instead of a thumb, it is a circle? Specifically, instead of that little triangle which points to the current position, it is a blue circle of width 100;
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you’re using the Metal L&F you could extend javax.swing.plaf.metal.MetalSliderUI and override the
horizThumbIconorvertThumbIconto be your circle. Then set this UI to be UI you’d like for your sider usingslider.setUI()look at this the answer here which performs a change for a JComboBox How can I change the arrow style in a JComboBox.