Am in an attempt to include Separator into BorderPane in my Java application, which is developing using JavaFX. I know how to include the Separator in a region of the BorderPane, that is in Top, Bottom, Left, Right or Center.
I want to implement a Separator in between 2 regions of the BorderPane, say Center and Right. The Separator should appear as a border between the Center and Right regions. I use either VBox or HBox in the regions of the BorderPane.
How can use Separator in the way I described ?
You can add a separator
as the last element
of your HBox. Lets consider,two scenarios :
you are using Center and Right part of the BorderPane
and you have a Hbox inside your Center
. So to put a separator between Center and Right, you can just place a separator as the Last element of the HBox.
If you have a VBox in the Center, you can wrap the VBox in a HBox and put the Separator as the second child of the HBox.