Java Swing How to - Hide the track








Question

We would like to know how to hide the track.

Answer

//  w  w w.j  av  a 2s.c  o  m

import javax.swing.JSlider;

public class Main {
  public static void main(String[] argv) throws Exception {
    JSlider slider = new JSlider();
    slider.setPaintTrack(false);

  }
}