troubleshooting Question

How to make a Biased JSlider?

Avatar of dajoebomb
dajoebombFlag for United Kingdom of Great Britain and Northern Ireland asked on
Java
3 Comments1 Solution334 ViewsLast Modified:
Hi guys,
Is there a way to make a slider Biased or 'Heavy'. What i mean by this is if you move the slider nearer the left side its more accurate then as it slides to the right side it jumps up the numbers more:

\/----------------------                  is 0
----------------------\/                  is 100
--\/--------------------                  is 4(2%)
---\/-------------------                  is 6(4%)
-------------------\/---                  is 80(85%)

Does this make any sense? Its quite hard to explain. Basically i have a slider with 1000 on and its quite difficult to use because most of the time they want to select low values e.g. 2,4,6,8,10.
Or would it be possible to make the ticks go up in 2's to 20, then 5's to 100, then 10's after that?
private void sliderChanged(javax.swing.event.ChangeEvent evt) {                               
    button1.setText("Number " + slider1.getValue());
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros