Is there a way to set margin between TitledPane in javafx?
I created multiple titledpanes and put them altogether inside a VBox
. I want it to have a gap between each titledpane.
I looked up setMargin()
method to achieve it, but it doesn't seem to be exist.
I also tried with css but it is not working at all.
CSS
.titled-pane {
-fx-font-weifght: bold;
-fx-margin: 5;
}
.titled-pane .title {
-fx-background-color: #990000;
-fx-padding:2 3 3 10;
-fx-margin: 5;
}