How to make tabs occupy the entire width and height of the header area in tabpane in javafx

I have a scoreboard whose tabs are on the left side. They occupy only the width as well as the font size, while the rest of the header is empty. Also, the space in front of the first tab makes tabpane more ugly! I found a solution, but this is more of a place that adds another menu to the tabbed bar. I am currently using this:

    pane.applyCss();
    pane.layout();
    pane.requestLayout();
    //tabs are on the left side
    tabPane.setTabMinWidth(tabPane.getHeight()/3-17);
    tabPane.setTabMaxWidth(tabPane.getHeight()/3-17);

But he still leaves some space at the end (and not at the beginning). If you change it to 18, then another menu is added to the header area.

Thank!

+4
source share

Source: https://habr.com/ru/post/1670780/


All Articles