I have a splitpane with three children, but I want to show just the 2 top or the 2 bottom children at a time. So I implement a sliding animation, which slide the splitpane in a parent pane up and down.
The sliding animation works fine, but when I resize the parent pane I have a problem with the divider positions. How can I make sure, that the divider positions are always correct?
The image should makes my idea clear.
Asked
Active
Viewed 1,247 times
1

Studiosus
- 143
- 1
- 11
1 Answers
1
Do you want to force the divider to always stay in the middle? You can use highlevel binding:
splitPane.getDividers().get(0).positionProperty()
.bind(splitPane.heightProperty().divide(2));
Hope this helps.

Muten Roshi
- 493
- 2
- 5
- 17
-
1`java.lang.RuntimeException: Divider.position : A bound value cannot be set.`. – Eng.Fouad Mar 12 '16 at 18:57