i want to set the slider's arrrow in 100.. how can i do that?
public class NewClass { public static void setComponents(Container cont) { JSlider slider = new JSlider(100, 500); slider.setBounds(50, 50, 300, 50); slider.setMinorTickSpacing(10); slider.setMajorTickSpacing(100); slider.setPaintTicks(true); slider.setPaintLabels(true); cont.setLayout(null); cont.add(slider); } public static void showTheWindow() { JFrame frame = new JFrame(); setComponents(frame.getContentPane()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(400, 200); frame.setVisible(true); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { showTheWindow(); } }); } }
tnx in advance!