List of usage examples for javax.swing JSlider getLabelTable
@SuppressWarnings("rawtypes") public Dictionary getLabelTable()
From source file:Main.java
public static void main(String[] argv) throws Exception { JSlider slider = new JSlider(); Dictionary table = slider.getLabelTable(); ImageIcon icon = new ImageIcon("icon.gif"); JLabel label = new JLabel(icon); // Set at desired positions table.put(new Integer(slider.getMinimum()), label); table.put(new Integer(slider.getMaximum()), label); // Force the slider to use the new labels slider.setLabelTable(table);// w w w .j av a 2 s .co m }