I have a working map using Pane and Path and Label objects. I place several Path and Label objects onto the Pane. The Path objects represent countries and the Label objects their capitals. So it shows a country and in the middle a Label with a String object bound to the Label.
count.textProperty().bind(system.getNations().get(nameNoSpace).getTroopCount().asString());
When using BorderPane
instead of Pane the Label objects suddenly stop showing up?
Any idea what is the reason ?
Is the BorderPane
hiding the Labels ?
Thanks
You cannot add children to a BorderPane using the
root.getChildren().add(node)
method. to add object to a BorderPane you need to use other methods such asSee the BorderPane documentation for more informations.
If you need to use the
getChildren().add()
method you can insert a Pane at the center of the BorderPane and add the nations in the Pane.