title: Howto set labels match major ticks with JSlider in Java
body: <p>When I change major ticks on a JSlider, labels (if painted) don't change. </p>
  
  <p>I have have this situation 
  <img src="https://i.stack.imgur.com/XtT9I.png" alt="first situation"></p>
  
  <p>and i change major tick spacing </p>
  
  <pre><code>jSlider.setMajorTickSpacing(20);
  </code></pre>
  
  <p>I obtain this </p>
  
  <p><img src="https://i.stack.imgur.com/ONSCd.png" alt="enter image description here"></p>
  
  <p>how to obtain this situation ? 
  <img src="https://i.stack.imgur.com/qHDAp.png" alt="enter image description here"></p>