To make my tab corners rounded I use the following code:
.tab {
-fx-border-radius: 10 10 0 0;
-fx-background-radius: 10 10 0 0;
}
.tab:selected .focu
So lets suppose that it's a bug, and you css is fine, the only solution i see for now is to remove and add default styles after some delay. Something like this:
Tab tab = new Tab("Tab " + (tabs.getTabs().size() + 1));
tabs.getTabs().add(tab);
new Thread(()-> {
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
Platform.runLater(()->{
tabs.getStyleClass().remove("tab-pane");
tabs.getStyleClass().add("tab-pane");
});
}).start();
Nasty hack to be honest, but it works for me: