Please run the following code
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Slider;
import javafx.stage.Stage;
public class SliderTest extends Application {
@Override
public void start(Stage stage) {
Group root = new Group();
Scene scene = new Scene(root, 150, 100);
stage.setScene(scene);
double x = 1.e-4;
Slider s = new Slider(0., x, x / 3);
s.setPadding(new Insets(20, 20, 20, 20));
s.setShowTickLabels(true);
s.setShowTickMarks(true);
s.setMajorTickUnit(x / 3);
root.getChildren().add(s);
stage.show();
}
public static void main(String[] args) { launch(args); }
}
all the slider tick labels are "0" - see "nok1.png"
then try x = 1.e-3 => "nok2.png"
JDK9 b132 was used. OS - Windows 7
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Slider;
import javafx.stage.Stage;
public class SliderTest extends Application {
@Override
public void start(Stage stage) {
Group root = new Group();
Scene scene = new Scene(root, 150, 100);
stage.setScene(scene);
double x = 1.e-4;
Slider s = new Slider(0., x, x / 3);
s.setPadding(new Insets(20, 20, 20, 20));
s.setShowTickLabels(true);
s.setShowTickMarks(true);
s.setMajorTickUnit(x / 3);
root.getChildren().add(s);
stage.show();
}
public static void main(String[] args) { launch(args); }
}
all the slider tick labels are "0" - see "nok1.png"
then try x = 1.e-3 => "nok2.png"
JDK9 b132 was used. OS - Windows 7