import javax.swing.plaf.basic.BasicSliderUI; static void fixSliderScrolling(final JSlider s) { MouseListener[] listeners = s.getMouseListeners(); for (MouseListener l : listeners) s.removeMouseListener(l); // remove UI-installed TrackListener final BasicSliderUI ui = (BasicSliderUI) s.getUI(); BasicSliderUI.TrackListener tl = ui.new TrackListener() { // this is where we jump to absolute value of click @Override public void mouseClicked(MouseEvent e) { Point p = e.getPoint(); int value = ui.valueForXPosition(p.x); s.setValue(value); } // disable check that will invoke scrollDueToClickInTrack @Override public boolean shouldScroll(int dir) { return false; } }; s.addMouseListener(tl); }