Questions tagged [jslider]

JSlider is a Java Swing component that lets the user graphically select a value by sliding a knob within a bounded interval.

381 questions
2
votes
1 answer

Using paintThumb I've made my arrow fall off the JSlider when at 0 or 100, how can this be fixed?

The picture explains it all. I've painted a new Thumb and it goes off the JSlider area when at higher than 95 or below 5. I've tried padding the Track with no success. Does anyone have any tips? Here is my code. I believe my issue is fine turning…
Landmine
  • 1,759
  • 6
  • 39
  • 60
2
votes
0 answers

How do I disable user interaction with a JSlider?

I have a JSlider and I want to make it so I can not move it with my mouse. Instead I have set the Slider to interact with update methods determined by observables. So if slider is 3 one time and then I click a JButton and some value changes to 4 the…
user3466773
  • 176
  • 1
  • 2
  • 14
2
votes
1 answer

Changing the width of a knob on a JSlider

Ok, so I have searched google for a while now to see if I can find the answer to this but no dice. Maybe I am just searching for the wrong thing but this is what I want to know: How do you change the width of the actual Knob on the JSlider…
jt153
  • 111
  • 1
  • 1
  • 4
2
votes
1 answer

JSlider with close double values

I have a JSlider and I want it to match up with my JFreeChart points, but the issue is that the x-values for my plot has values such as 8.993 and 8.997, so rounding will cause issues. Is there a way I can get my slider to match up with doubles (I…
Sam
  • 405
  • 2
  • 5
  • 13
2
votes
0 answers

UIManager.put() not working?

I'm using an app with JSliders and setting the look and feel to platform default. Now I'm trying to set the slider's thumb size using this code: UIManager.put("Slider.thumbHeight",5); UIManager.put("Slider.thumbWidth",20); but their size remains…
user1126068
2
votes
1 answer

How can I make a JSlider in a curve shape?

I want to create a Java Application for my parent's Estate Agency holiday let online booking service. Unfortunately I can't yet post images but they want a kind of slider style booking service in which the user slides the bar to select price,…
2
votes
1 answer

JSlider is not displaying in minimum size

I have a very simple JFrame with only single JSlider in its North Panel. I want JSlider to be displayed in minimum size by following method. slider.putClientProperty("JComponent.sizeVariant", "mini"); but it is still displaying in its normal size.…
2
votes
1 answer

Using Slider to rotate Object In java

I have made a GUI that uses a slider to scale an object up and down.(in this case a rectangle). I was wondering if there was a way to also use a slider to specify a degree of rotation. So there would be 2 sliders one to control scale and another to…
malideux
  • 53
  • 1
  • 9
2
votes
2 answers

JSlider key bindings

So I'm a bit nonplussed at the JSlider default key bindings for vertical sliders. Home: goes to the bottom (why not the top?) End: goes to the top (why not the bottom?) PageUp/PageDown: direction good, but goes up by some amount K which I can't…
Jason S
  • 184,598
  • 164
  • 608
  • 970
2
votes
0 answers

Programatically make a JSlider look "pressed"

so I have a JSlider that has a custom synth look and feel, that looks like this (in xml):
SuperTron
  • 4,203
  • 6
  • 35
  • 62
2
votes
2 answers

Snapping to certain values in JSlider possible?

I want to create a JSlider with only four possible values: 10 (min), 30, 60, and 100 (max). Is it possible to create one that can "snap" to only these values? If so, can you please provide an example? Thanks!
BJ Dela Cruz
  • 5,194
  • 13
  • 51
  • 84
2
votes
1 answer

Set tick behavior of swing JSlider and JTextField

This is my GUI: Below is a SSCCE that will produce exactly this. The JSlider is connected to the JTextField showing values between 0 and 100. I have set the following to make it stop on intervals of 10. It works, but the textfield will still show…
Goatcat
  • 1,133
  • 2
  • 14
  • 31
2
votes
1 answer

JSliderNews jQuery Plugin circular

Hi I'm using the JSliderNews jQuery Plugin, but I the end of the slideshow it goes back to the first one but showing all previous slides. I want it to be circular without showing all the previous slides. Here you have an example :…
user2037696
  • 1,055
  • 3
  • 16
  • 33
2
votes
1 answer

Update transparancy of jFreeChart in real time with JSlider

I would like to ask a follow up question to this Q&A question (How can I update a JFreeChart's appearance after it's been made visible?) from @trashgod. I am trying to give the user a JSlider to control the transparency of the graphs. I added a…
ryvantage
  • 13,064
  • 15
  • 63
  • 112
2
votes
3 answers

How to un-link a JSlider's progress indicator from its thumb?

I'm using a JSlider to show progress in my application, so that it updates as a certain process computes. I want a user to be able to drag the thumb backwards to a tick mark in the past, but when this happens, I want the progress indicator to…
Cuga
  • 17,668
  • 31
  • 111
  • 166