I\'m trying to create a customized toolbar in javafx. This toolbar should be able to display controls in the center, in the left side and in the right side (three sections)
Simply use a HBox instead of a StackPane. A StackPane puts Nodes on top of each other.
See a modified example of your third attempt.
Another option would be to use the FX ToolBar, similar to how jewelsea already mentioned:
See an example using a ToolBar.
Both attempts should be flexible enough for your needs. They differ in how much control you get over the layout and how many features you can inherit from the standard ToolBar.