-
Bug
-
Resolution: Fixed
-
P4
-
7u6
-
2.2.0b20
Code:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Pagination;
import javafx.scene.control.Slider;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class JavaApplication50 extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
VBox vb = new VBox();
final Pagination pg = new Pagination();
final Slider s1 = new Slider(-10, 100, 5);
pg.currentPageIndexProperty().bind(s1.valueProperty());
vb.getChildren().addAll(pg, s1);
Scene scene = new Scene(vb, 300, 300);
stage.setScene(scene);
stage.show();
}
}
Exception:
java.lang.RuntimeException: A bound value cannot be set.
at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:159)
at javafx.scene.control.Pagination.setCurrentPageIndex(Pagination.java:276)
to reproduce, just run the code.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Pagination;
import javafx.scene.control.Slider;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class JavaApplication50 extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
VBox vb = new VBox();
final Pagination pg = new Pagination();
final Slider s1 = new Slider(-10, 100, 5);
pg.currentPageIndexProperty().bind(s1.valueProperty());
vb.getChildren().addAll(pg, s1);
Scene scene = new Scene(vb, 300, 300);
stage.setScene(scene);
stage.show();
}
}
Exception:
java.lang.RuntimeException: A bound value cannot be set.
at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:159)
at javafx.scene.control.Pagination.setCurrentPageIndex(Pagination.java:276)
to reproduce, just run the code.