Search code examples
javafxjfxtras

How to customize Window in JFXtras Labs 8.0?


I can change icons(close,minimize) background, but i don't know how to change icon size and tittle bar size.


Solution

  • if you change the font size of the header, then the change is proportional to the size of icons and the titlebar itself.

    css file:

    .custom-window-titlebar {
        -fx-font: Tahoma;
        -fx-font-size: 60px;
        -fx-fill: rgba(255,255,255,50);
        -fx-alignment: center;
        }
    

    and set style class:

    Window window = new Window("My MDI Window");
    window.setPrefSize(1760, 770);
    window.setTitleBarStyleClass("custom-window-titlebar");