Point « JSlider « Java Swing Q&A





1. Is there a way to flip a JSlider so that the slider arrow points upwards?    stackoverflow.com

I've been trying to find a way to do this for a while now and can't quite seem to figure it out. I know you can change the orientation of a ...

2. JSlider with decimal point increments    coderanch.com

not sure if there's any new inbuilt way to do it, but here's the old way import javax.swing.*; import java.awt.*; import javax.swing.event.*; class Testing { public void buildGUI() { final JSlider slider = new JSlider(0, 100, 1); slider.setMajorTickSpacing(25); slider.setPaintTicks(true); java.util.Hashtable labelTable = new java.util.Hashtable(); labelTable.put(new Integer(100), new JLabel("1.0")); labelTable.put(new Integer(75), new JLabel("0.75")); labelTable.put(new Integer(50), new JLabel("0.50")); labelTable.put(new Integer(25), new JLabel("0.25")); labelTable.put(new ...