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

java/swing: JSlider.setValue is blocking

my call to JSlider.setValue is sometimes blocking the thread which results ins a deadlock of the whole application. here is the stacktrace of the blocking thread. Thread [RenderThread] (Suspended) JSlider(Component).getMousePosition() line: not…
clamp
  • 33,000
  • 75
  • 203
  • 299
2
votes
1 answer

Multiple JSliders activating and deactivating - Sharing values

Context Im writing a piece of code that has 1+ Sliders. These sliders form a group. The sum of the slider values of this group must always be 100. However, as a NEEDED feature, the user can disable and enable (add/remove) sliders from this group.…
KenobiBastila
  • 539
  • 4
  • 16
  • 52
2
votes
4 answers

Circular JSlider?

A JSlider by default takes a straight line shape. Can we make JSlider a circle resembling like speed-o-meter or circle with reading? If anyone has done something similar to this task... Please share the code... Thank You
Jeetesh Nataraj
  • 608
  • 2
  • 8
  • 20
2
votes
2 answers

Jslider reflected in pannel

I don't know why, although I am trying to make a color picker and for some reason the slider gets reflected in the panel, if I use one of the sliders and resize the frame the thing disappears. Here is what I see: I tried to change how different…
Brain Bytes
  • 121
  • 1
  • 12
2
votes
0 answers

JSlider Label is not completely visible (java)

I have made a player that can display few steps with different images. Under this player I have added a JSlider, to jump to every step. It should have labels for the first and last steps. I managed by setting my own LabelTable for the JSlider. It…
DrChris
  • 21
  • 1
2
votes
1 answer

JSlider last value

When implementing JSlider's ChangeListener, the event is fired whenever the value changes. I need to get the last value of a JSLider: I don't need every value visited by the slider, just the last value when the user releases the slider pointer.
firas
  • 1,463
  • 4
  • 19
  • 42
2
votes
1 answer

Interaction between JTextField and JSlider - DocumentListener gets confused

I have a panel containing textfields (red, green, blue) and sliders (red, green, blue). Users are supposed to be able to utilize whichever they prefer, and the corresponding component should update. (E.g., entering 100 into the red textfield should…
2
votes
3 answers

How to hide the knob of jSlider?

I need to customize the knob of JSlider. I need to put my own knob's image over default knob of Jslider. The problem is that currently two knobs are coming in response. One my own knob and second the default knob. Please tell me how i can i hide…
Jyoti
  • 2,065
  • 3
  • 25
  • 28
2
votes
1 answer

How to fill JSlider track up to the point of the current thumb value with Nimubs L&F?

I am working on a volume slider and would like to change the default look of Nimbus JSlider. I want my JSlider to automatically fill the track up to the point of the current thumb value. An idea to this approach would be like (see picture) I've…
blueFalcon
  • 111
  • 9
2
votes
1 answer

Update JPanel border if JSlider changes

Can somebody tell me in general how I change some attributes of a JPanel/TitledBorder if I change a class variable through a JSlider? e.g. I have the class variable "number" and change this var through a stateChanged event on the slider. Now I want…
manCRO
  • 25
  • 5
2
votes
0 answers

How to update JSlider Tooltip without using a MouseAdapter?

I want to implement this solution Display Modified JSlider Value Above Thumb. But I do NOT want to use a MouseAdapter to control the Label (position and content). I just want the label to update when the value for the JSlider is modified. In my code…
MTA
  • 739
  • 2
  • 9
  • 29
2
votes
1 answer

Java Swing JSlider (Vertical) changing thumbRect messes up slider control

I'm trying to override paintThumb to show a graphic slider thumb. As long as I don't mess with size of the image and let it paint according to the existing size of the thumb the thumb image and slider functions fine. If I change the size of…
John Smith
  • 3,493
  • 3
  • 25
  • 52
2
votes
1 answer

link two JSliders using a checkbox

I´m working on a java GUI and I have two JSliders that I want to connect, using a checkbox. Specifically, when the checkbox is checked and I slide one of the sliders in one direction, I want the other slider to go in the opposite direction. Both…
Leonidas
  • 195
  • 1
  • 5
2
votes
1 answer

JSlider changeListener won't update - Java

I have a fractal tree generator and I am trying to make a slider control the number of iterations, but I can not get it to work. Also, the layout gets messed up whenever the repaint() method is called. Any thoughts on how to fix this? public class…
2
votes
1 answer

Java Swing, draw a line at a specific angle?

I made a JSlider with Java that changes the angle the line needs to be slanted at. angle = new JSlider(SwingConstants.HORIZONTAL, 0, 180, 90); angle.setSize(300, 50); angle.setLocation(650,…
Eliscpe
  • 47
  • 1
  • 7