JSlider is a Java Swing component that lets the user graphically select a value by sliding a knob within a bounded interval.
Questions tagged [jslider]
381 questions
0
votes
1 answer
Java slider with dial look and feel
I trying to create a JSlider object which has its line looking like an arc, there are minimum number of tick marks (though some may not have a value) and the slider indicator is a simple line drawn from the centre of the arc to the currently…

Tony
- 414
- 4
- 7
0
votes
1 answer
Change value of slider after knob is dragged
I'm trying to use the JSlider setValue(int) to automatically move the position of the knob to the closest tick when a user finishes dragging it. The position is set correctly when the user clicks, but not when they drag the knob. How do I fix thix?
…

Wex
- 15,539
- 10
- 64
- 107
-1
votes
1 answer
Make JSlider move constantly
I have this piece of code:
Timer timer;
ActionListener listener;
listener = new ActionListener() {
int counter = 0;
public void actionPerformed(ActionEvent ae) {
counter++;
jSlider1.setValue(counter);
…

chicoo
- 1
-1
votes
2 answers
Deactivate default java JSlider mouse callbacks
How do you deactivate e.g. the mouseReleased event callback on a JSlider component?

Stéphane Mottelet
- 2,853
- 1
- 9
- 26
-1
votes
1 answer
How to repaint image for every variable change from JSlider?
I want to make the displayed image repainted for everytime i change the slider position.
I've already made the Every change of the Variable from JSlider is added to the pixel. But i just don't know how to repaint it.
package training;
import…

Conan
- 31
- 6
-1
votes
1 answer
How to set a JSlider to the duration of an audio file?
Is this event possible to implement in a JSlider or not? Also, can one be able to move the slider to a certain point in the audio file? To Elaborate, the user can drag the slider to any point in the JSlider which causes the playback to "rewind" or…

Tommy Wisseu
- 13
- 2
-1
votes
2 answers
displaying RGB to a JLabel from a JSlider
I'm trying to write a program that takes color values for red,green, and blue from a slider for each value and then displays it as an rgb value. I'm not exactly sure how to pull the rgb value from the three sliders but I think I am close. I can't…

Michael Fogarty
- 303
- 1
- 3
- 10
-1
votes
1 answer
How to set JSlider parameter from 0 to 1 that can return floats
I'm trying to modified this JSLider function
public JSlider getSlider(int min, int max, int init, int mjrTkSp, int mnrTkSp) {
JSlider slider = new JSlider(JSlider.HORIZONTAL, min, max, init);
slider.setPaintTicks(true);
…

napi15
- 2,354
- 2
- 31
- 55
-1
votes
1 answer
JAVA - remove and copy a ChangeListener from a JSlider
I'm having trouble with a Slider for a Volumecontrol.
Atm I use FloatControl to handle the MasterVolume of an Audioclip, bad for me I need a new ChangeListener for every new AudioClip - so i tried this:
JSlider slider_Vol // the Object i use the…

Skandix
- 1,916
- 6
- 27
- 36
-1
votes
1 answer
Replacing JSlider by Knob in java applications
It is very common that we use JSliders in our java applications. But I want to replace JSliders by knobs. I need some guidance to study in this respect.

Harjit Singh
- 905
- 1
- 8
- 17
-1
votes
1 answer
JSlider Middle label cant go over 3 characters
I have a JSlider and have 3 labels in my label table, one for 0 one for 50 and one for 100. Now in my ChangeListener state Changed I set the middle label. It works for all he numbers other then 100. Then for some reason it displays ... instead of…

Ludger
- 991
- 2
- 11
- 22
-1
votes
1 answer
Change Hue of Picture in Graphics
Ok so i need help changing the hue of this slider. I cant seem to figure it out. Please no @override. I need something that will run on Ready to Program. The hue will change back to normal when the slider is back at 0. I dont need to get too…

user3386236
- 13
- 5
-1
votes
1 answer
How to move jslider its start position to end postion automatically when pressing a button in java
I have a code below
jSlider1.setValue(0);
int i =0;
while (i <= jSlider1.getMaximum()) {
jSlider1.setValue(i);
// JOptionPane.showMessageDialog(rootPane,"deded");
…

user3317730
- 1
- 3
-1
votes
1 answer
Multiple Point JSlider, similar to Fixed Width Slider in Microsoft Excel
I want to make a slider in Java, similar to JSlider, but it can have muliple sliders within itself. To be precise, I want to implement the slider used in Fixed Width Functionality in Microsoft Excel(From Data-> Fixed Width).
A normal slider has…

App
- 1
- 1
-1
votes
1 answer
Positioning a Slider in a JPanel using Java
Ok, like with everything I find it easier to learn when jumping into the deep end (Java, PHP, Air Traffic Controlling) I just try not to kill anybody in the process; however, I cannot find any information of how to specifically position a slider…

Phil
- 1,393
- 5
- 23
- 42