I want the tabs in my tabpane to fit the complete size of the tabpane which they are in. So basically there shall be no header area visible, everything should be covered by
It's true, the property objects of tabs are READ-Only. This means that you cannot manually set the properties. However, the values of the read-only properties can be bound to other properties, also the properties have some manipulation methods e.g. divide, subtract, please check the documentation for extended information.
You can call the .tabminWidthProperty()
on the tabpane and bind it to the width-property value of the parent of the layout.
Here's the code to size all available tabs equally filling the whole screen:
tabpane.tabMinWidthProperty().bind(root.widthProperty().divide(tabpane.getTabs().size()).subtract(20));
I subtracted 20 to avoid the horizontal/vertical scrollbar. Surely there is also a way to disable them to pop up at all, but I'm an Android Dev and a greenhorn in JavaFx.