Muskan
Muskan

Reputation: 11

change the style of default title in stage using javafx

I want to change the style of title in stage but i couldn't find anything. I tried some css codes like:

 .title {
    -fx-font-size: 18px;
    -fx-font-family: "B Homa";
}

but it didn't work for me.I searched about the style of window in javafx and I figured it out that the default style of every native window is Decorated and for designing a custom window I must use UNDERCOATED mode, but I just want to change the size and font style of native window (different font and size) .

Upvotes: 0

Views: 1806

Answers (1)

Phil
Phil

Reputation: 306

I think this is not possible with a decorated default window. The window itself is a native window from your OS. For example on windows the window implementation is:

com.sun.glass.ui.win.WinWindowand

the title is managed in a native method:

@Override native protected boolean _setTitle(long ptr, String title);

Upvotes: 1

Related Questions