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
4
votes
1 answer

How to get thumb icon of swing jslider?

I need to get the thumb icon which is used to select range in Jslider. How to get only the thumb icon from Jslider?
Sri
  • 669
  • 2
  • 13
  • 25
4
votes
1 answer

Is there a way to flip a JSlider so that the slider arrow points upwards?

I've been trying to find a way to do this for a while now and can't quite seem to figure it out. I know you can change the orientation of a JSlider, using setOrientation(HORIZONTAL|VERTICAL), and that you can also invert the scale, using…
ahugenerd
  • 307
  • 3
  • 8
4
votes
1 answer

Display Modified JSlider Value Above Thumb

Is there an easy way to change the value displayed in the label above a JSlider while using certain "look and feel"s? To be clear, I'm talking about this value: Specifically, I would like to show the value divided by 1000 instead of the value…
Vaelus
  • 1,065
  • 10
  • 27
4
votes
1 answer

Java Swing slider labels not updating according to slider min/max values

The label table on my JSlider is not updated according to the slider minimum and maximum values when these values change. The minimum/maximum values are updated correctly as the getMinimum() and getMaximum() methods return the correct values. The…
4
votes
1 answer

Java: link JSlider and JTextfield for float value

what is the best and easiest way to link a JSlider and a JTextField so that if one changes, the other gets updated too, but there is no recursive loop? thanks!
clamp
  • 33,000
  • 75
  • 203
  • 299
4
votes
2 answers

Changing the min and max value of JSlider depanding on condition

I'm creating a Swing GUI in Netbeans. The purpose of this GUI is to open an (buffered)image (in a JLabel as icon) and apply Affine transforms on it. Now there are 4 transforms that I'm doing as follows. Now, each transform requires two sliders to…
md1hunox
  • 3,815
  • 10
  • 45
  • 67
4
votes
1 answer

How to set a background image to JSlider?

I have an applet. I set its image background. It works fine. Now I want to set a background image to a JSlider. How can I do that?
4
votes
1 answer

JSlider alternative

I have just realised that JSlider cannot deal with floating point numbers. Can anybody recommend a Swing/AWT alternative that can? EDIT: Or a workaround of some description.
Jack H
  • 2,440
  • 4
  • 40
  • 63
3
votes
4 answers

Java: Double-Click a JSlider to Reset

I have a JSlider that sets the speed of my metronome, from 40 - 200, where 120 is the default, in the middle. When the user clicks the metronome button, the metronome plays at the speed displayed on the JSlider - the user drags the slider to the…
Devan Somaia
  • 645
  • 1
  • 8
  • 21
3
votes
1 answer

JSlider in JTable

For putting a JSlider into a JTable I wrote am AbstractCellEditor which implements a TableCellRendererand a TableCellEditor. It gets initialized with values from 0 to 100. I have the strange behaviour that when I first click onta a slider it jumps…
Razer
  • 7,843
  • 16
  • 55
  • 103
3
votes
4 answers

Tooltip in labels in JSlider

I want to create a JSlider with labels, which have a tooltip. JSlider slider = new JSlider(); JLabel label = new JLabel("First"); slider.setPaintLabels(true); Hashtable labels = new Hashtable
Brantner
  • 105
  • 1
  • 2
  • 8
3
votes
2 answers

Java JSlider set values

How can I set the values of a JSlider? I want to assign it specific values, with intervals that are not constant. Please help
jpo
  • 3,959
  • 20
  • 59
  • 102
3
votes
2 answers

jSlider go to clicked position - problem only on Macintosh

I have been using the above MetalSliderUI solution for all my JSliders. Windows users have been happy with it. I appreciate finding this solution on stackoverflow.com The solution was discussed here: JSlider question: Position after leftclick Now…
howard
  • 41
  • 4
3
votes
3 answers

Movable bars with value using java

I want to create a bar with a value. If i move the circle, then the value in the field should change. How can i do this? Here is the screen shot. How can i achieve this? Something similar to this is also ok. Please help me with this. Thank you in…
Srikanth
  • 1,861
  • 17
  • 29
3
votes
1 answer

How to vertically align two JSlider objects independent of tick labels

I am using several horizontally positioned JSlider objects in my Java application and would like to align their left and right track ends vertically. That means whenever two knobs are positioned on the left end of their track the upper knob should…
Sandreal
  • 33
  • 3
1
2
3
25 26