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
You can simply add a listener to the TabPane to detect any changes and adjust the width and/or height of the tabs accordingly.
@FXML
private JFXTabPane tabPane;
Divide the width by number of tabs:
tabPane.widthProperty().addListener((observable, oldValue, newValue) ->
{
tabPane.setTabMinWidth(tabPane.getWidth() / tabPane.getTabs().size());
tabPane.setTabMaxWidth(tabPane.getWidth() / tabPane.getTabs().size());
});