Вопрос

I have a VBox with elements and one Line(javafx). I want the line's height to be same as that of the VBox. These elements are put inside a Hbox and I have many such Hbox's.

The problem is vbox.getHeight() returns me zero unless I have put the whole thing inside the scene graph.

Any alternatives to solve this ?

Это было полезно?

Решение

You could bind the height of the line to the heightProperty of the VBox.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top