title: JSlider rendering with custom LabelTable
body: <p>I want to use a JSlider to browse some chronological events, so I set a custom LabelTable so that it displays some Dates instead of the default integer values. My code goes like this:</p>
  
  <pre><code>JSlider slider = new JSlider();
  ...
  Date[] dates = getDates();
          slider.setModel(new DefaultBoundedRangeModel(0, 0, 0, dates.length - 1));
          Hashtable&lt;Integer, JLabel&gt; ht = new Hashtable&lt;Integer, JLabel&gt;();
          for (int i = 0; i &lt; dates.length; ++i) {
              JLabel label = new JLabel(DateFormat.getDateInstance().format(dates[i]));
              ht.put(i, label);
          }
          slider.setLabelTable(ht);
          slider.setPaintLabels(true);
          slider.setInverted(true);
  </code></pre>
  
  <p>This works fine, as you can see:
  <img src="https://i.stack.imgur.com/8dh9L.png" alt="enter image description here"></p>
  
  <p>However, if I want to change the orientation of the slider, say <code>slider.setOrientation(JSlider.HORIZONTAL);</code>, here is the result:
  <img src="https://i.stack.imgur.com/qikbO.png" alt="enter image description here"></p>
  
  <p>What if I want to, say, display one date above/one date below the slider on every other date? Also, can I display the labels to the left of the slider on the Vertical slider?</p>
  
  <p>Regards,
  Remi</p>